JW Player不在firefox中工作?

时间:2011-12-16 18:44:22

标签: firefox jwplayer

在我的网络应用程序中,我放置了jw播放器来播放视频文件。它不适用于火狐和Google Chrome。它在IE中工作

         dvplayer.InnerHtml = "<object id='player' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' name='player' width='500' height='300' > <param name='movie' value='player.swf' /> <param name='allowfullscreen' value='true' /> <param name='allowscriptaccess' value='always' /> <param name='flashvars' value='file=" + file + "&autostart=true' /> </object>";

1 个答案:

答案 0 :(得分:2)

我写了一个在Chrome和Firefox中运行的小测试:

<div id="mediaplayer">JW Player goes here</div>
<script type="text/javascript">
    var file = "video.mp4";
    document.getElementById('mediaplayer').innerHTML = '<object type="application/x-shockwave-flash" data="player.swf" width="100%" height="100%" bgcolor="#000000" id="mediaplayer" name="mediaplayer" tabindex="0"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="seamlesstabbing" value="true"><param name="wmode" value="opaque"><param name="flashvars" value="netstreambasepath=file%3A%2F%2F%2Fhome%2Faeby%2Fworkspace%2Fatws%2Ftest.html&amp;id=mediaplayer&amp;file=' + file + '&amp;image=preview.jpg&amp;controlbar.position=over"></object>';
</script>

一个错误是InnerHtml 不是小写。它应该是dvplayer.innerHtml