Loading an FLV in Facebox with jQuery for IE7 and IE8
- by Trip
It goes almost without saying, this works perfectly in Chrome, Firefox, and Safari. IE (any version) being the problem.
Objective: I am trying to load JWplayer which loads an FLV from S3 in a Facebox popup.
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})
HTML (haml):
%li#videoGirl
= link_to 'What is HQchannel?', '#player', :rel => 'facebox'
.grid_8.omega.alpha#player{:style => 'display: none;'}
:javascript
var so = new SWFObject('/flash/playerTrans.swf','mpl','640px','360px','0');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('wmode','transparent');
so.addVariable('file', 'http://hometownquarterlyvideos.s3.amazonaws.com/whatishqchannel.flv&autostart=true&controlbar=none&repeat=always&image=/flash/video_girl/whatishqchannel.jpg&icons=false&screencolor=none&backcolor=FFFFFF&screenalpha=0&overstretch');
so.addVariable('overstretch', 'true')
so.write('player');
Problem:
Despite the video being set to display: none;. It begins playing anyway.
When clicking on the activation div, IE7 pops up a wrong sized blank div with a nav (params are set to not show nav and scrubber), and no buttons on the nav and srubber work. IE8 shows the right size but same behavior with nav and scrubber not working, and blank screen.
My guess:
I'm thinking that the problem is with the javascript not being called at the right times. It seems it's loading the facebox without the jwplayer. At least I assume. Hence the reason why the nav is there. I thinking that it did not read the javascript for that.