我有一個flash播放器(僅用於瀏覽器不支持HTML5視頻)成立這樣的:使用jQuery建立一個flash播放器
<object id="mpl" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="400" height="300">
<param name="id" value="mpl" />
<param name="movie" value="/r/player.swf" />
<param name="quality" value="high" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
</object>
對於那些,我需要閃光的情況下,這是怎麼了我試圖動態設置網址。它適用於Chrome,但不是IE8(IE9模式下的IE9),這是我真正需要這個工作的地方。
我收到的錯誤是「無效的參數」在jquery中,對應於append方法的行。
IE8是否希望我以另一種方式做到這一點?
data.videoPlayerContainer.find("object").append($('<param name="flashvars" value="width=400&height=300&displayheight=300&file=' + encodeURIComponent(flashUrl) + ' &autostart=true&type=flv&bufferlength=10&javascriptid=mpl&enablejs=true" />'));
data.videoPlayerContainer.find("object").append($('<embed src="/r/player.swf" name="mpl" width="400" height="300" bgcolor="#ccc3ad" allowfullscreen="true" allowscriptaccess="always" flashvars="width=400&height=300&displayheight=300&file=' + encodeURIComponent(flashUrl) + '&type=flv&bufferlength=10&showicons=false&shownavigation=false&autostart=true&javascriptid=mpl&enablejs=true" />'));
您是否嘗試過使用[SWFObject](http://code.google.com/p/swfobject/)? –