I’m expanding a CGI application that has numerous "display:none;" divs, which the user can expand and collapse to view various parts of the page contents. Video content is the new thing I’m trying to add.
Everything was working great until I tried it on IE (version 8, fwiw). Turns out that IE won’t completely initialize the flash player object if it’s invisible, either via display:none; or visibility:hidden;. When the object is made visible by user interaction after the page has loaded, the flash player is there, but it has not loaded its video.
The swf component I’m currently experimenting with is from http://flv-player.net, but I had the same problem with OSPlayer from http://www.osflv.com/. I haven’t tried flowplayer yet, but I kinda doubt the player is the variable here.
Again, everything works perfectly under Firefox, on either Windows or Linux.
This isn’t a problem for our internal users, because we have Firefox installed throughout the building. But we have some external users of whom I assume the majority have IE, so I need to puzzle this out.
I’ll post a link to a sample page shortly unless some bright person already knows the answer. Thanks.
Not long after posting the question it occurred to me that wrapping the video in an iframe might work – the javascript call would set the source attribute for the iframe after making it visible, forcing it to act like a fresh page load. That did okay in a quick test, so I’ll try wiring it into real code when I’m back at work tomorrow. 