0

I have some videos that load into a fancybox iframe. The relevant iframe code is:

$('.fancybox').fancybox({
 modal : true,
 maxWidth : 570,
 maxHeight : 320,
 autoSize : true,
 autoWidth: true,
 autoHeight: true,
 fitToView: false,

The videos are in a container with max-width:550px (so it scales for smaller viewports). At the end of the last video there's an endcard with a link to a new page which is supposed to just insert itself into the same iframe. But instead, the iframe collapses to a height of about 150px, which is the height of the div on the page. I added fitToView: false based on an answer I saw here, hoping it would maintain the iframe height at whatever it was for the videos. It doesn't.

What would do the trick?

plugincontainer
  • 630
  • 2
  • 9
  • 28
  • maybe removing `autoWidth` and `autoHeight` and adding `minWidth` and `minHeight` instead – JFK Sep 04 '14 at 01:00
  • Yes, without autoWidth and autoHeight it does not resize. Thanks. But - related problem - no luck with minwidth, minheight - the iframe goes straight to max. In the iframe I'm using swfobject and swiffit to detect and size a Flash movie, max size 800px wide. If no flash is detected, the iframe loads instead the mp4 video, 550px wide. But the iframe goes to 800px for the video. How do I have the iframe size itself to the content? Or maybe that takes me back to the original problem? – plugincontainer Sep 04 '14 at 10:02
  • JFK, as often happens, one solution leads to a new problem, described here: http://stackoverflow.com/questions/25666313/change-fancybox-iframe-size-according-to-content-height-width Advice appreciated. – plugincontainer Sep 04 '14 at 13:18

0 Answers0