Sunday, May 27, 2012

JWPlayer 4 not playing flash files on IE9

Was fixing a bug on a Drupal 5 site recently; basically flash videos were not playing on IE9. The player being used was Jwplayer 4. 


The player initialized as follows;


var playerscriptproxy = new SWFObject("swf/player.swf","ply","660","525","9","#FFFFFF");
playerscriptproxy.addParam('flashvars','skin=modieus.swf');
playerscriptproxy .write("videoplayer");


Doesn't work on IE9;


Turns out after initializing the player adding the skin via addParam somehow overwrote the original video reference, thereby showing just a blank video player;


Solution is to add it all as a part of one reference;

playerscriptproxy.addParam("flashvars", "file=videos/video.flv&skin=modieus.swf");

Hope this helps somebody out.

Cheers,

No comments:

Post a Comment