km44
Posts: 1
Joined: Wed Jan 21, 2015 9:18 am

Iframe wrapper scaling

I've this kind of code for using Highslide on youtube iframe, it's working perfectly, but if browser width is below 640px, it only scales by width and wrapper height is still 390px (if browser height is greater than 390px).

It works same for other way, if browser height is below 390px it only scales by height and width is 640px (if browser width is greater than 640px).

Code: Select all

<a href="//www.youtube.com/embed/$2?autoplay=1&loop=1&rel=0&theme=light&wmode=transparent" target="_blank" class="youtube highslide" onclick="return hs.htmlExpand(this, {objectType: 'iframe', width: 640, height: 390, allowWidthReduction: true, wrapperClassName: 'draggable-header', preserveContent: false, objectLoadTime: 'after'})">
   <img style="width:360px;height:270px;" src="//img.youtube.com/vi/$2/0.jpg" class="youtube-thumbnail" alt="" />
</a>
Is there any way to make scaling work like in pictures? Ie. if browser width is in this case 320px and height over 390px, Wrapper is scaled to that width AND height is scaled to same ratio, in this case 195px?

Sorry for my english, and thanks for any kind of help.
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Iframe wrapper scaling

Perhaps RoadRash will have some ideas, but as far as I know, the script doesn't have any way to do this. It would certainly be very helpful for scaling videos. This has been on my Highslide JS "wish list" for years (along with a few other items), but there's no sign that the script will see any further development. :(
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Iframe wrapper scaling

Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no

Return to “Highslide JS Usage”