SCRIPT5009: 'Object' is undefined
var myListener = new Object();
En ie9 da ese error pero almenos reproduce el video, en ie7 ni por asomo y nisiquiera error.... Ojala podais echarme una mano, os dejo el html con el js del reproductor
Código Javascript:
Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <title>Banner Presidencia</title> <script type="text/javascript"> var myListener = new Object(); var volume = 100; myListener.onInit = function(){ load(); mute(); play(); var cookie = getCookie('played'); if(!cookie){ setCookie('played',true,1); }else{ stop(); } getFlashObject().innerWidth = window.innerWidth; getFlashObject().innerHeight = window.innerHeight; }; myListener.onClick = function(){ if(this.isPlaying == "true") {pause();} else {play();} }; myListener.onKeyUp = function(pKey){}; myListener.onFinished = function(){ stop(); }; myListener.onUpdate = function(){}; function getFlashObject(){ return document.getElementById("myFlash"); } function load(){ getFlashObject().SetVariable("method:setUrl", "#flv#"); } function play(){ //if (myListener.position == 0) { setVolume(100); document.getElementById('playerplay').style.display = "block"; //} getFlashObject().SetVariable("method:play", ""); } function pause(){ getFlashObject().SetVariable("method:pause", ""); document.getElementById('playerplay').style.display = "block"; } function stop(){ getFlashObject().SetVariable("method:stop", ""); document.getElementById('playerplay').style.display = "block";} function setVolume(v) { volume = v; getFlashObject().SetVariable("method:setVolume", v); } function mute(){ volume = (volume) ? 0 : 100; getFlashObject().SetVariable("method:setVolume", volume); } function loadImage() { var url = document.getElementById("inputImage").value; var depth = document.getElementById("inputImageDepth").value; var verticalAlign = document.getElementById("inputImageVertical").value; var horizontalAlign = document.getElementById("inputImageHorizontal").value; getFlashObject().SetVariable("method:loadMovieOnTop", url+"|"+depth+"|"+verticalAlign+"|"+horizontalAlign); } function setCookie(c_name,value,exdays) { var exdate=new Date(); exdate.setDate(exdate.getDate() + exdays); var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString()); document.cookie=c_name + "=" + c_value; } function getCookie(c_name) { var i,x,y,ARRcookies=document.cookie.split(";"); for (i=0;i<ARRcookies.length;i++) { x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("=")); y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1); x=x.replace(/^\s+|\s+$/g,""); if (x==c_name) { return unescape(y); }else return false; } } </script> <!--[if IE]> <script type="text/javascript" event="FSCommand(command,args)" for="myFlash"> eval(args); </script> <![endif]-->
Código HTML:
Ver original
</head> <body style="padding:0px; margin:0px;"> <object id="myFlash" type="application/x-shockwave-flash" data="/assets/player_flv_js.swf" width="707" height="394"> <param name="wmode" value="transparent" /> <param name="movie" value="/assets/player_flv_js.swf" /> <param name="AllowScriptAccess" value="always" /> <param name="bgcolor" value="#0119fd"> <param name="FlashVars" value="listener=myListener&interval=100&useHandCursor=0&bgcolor=000000&buffer=2"/> /> </object> </body> </html>