Loading an FLV in Facebox with jQuery for IE7 and IE8

Posted by Trip on Stack Overflow See other posts from Stack Overflow or by Trip
Published on 2010-06-16T19:38:18Z Indexed on 2010/06/16 19:42 UTC
Read the original article Hit count: 245

Filed under:
|
|
|
|

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:

  1. Despite the video being set to display: none;. It begins playing anyway.
  2. 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.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery