2011-08-03 151 views
18

我开发了一个MVC3应用程序,因为我使用html5视频控件,当我运行它在Chrome中播放的应用程序时,但是当我尝试在IE8浏览器中播放时,它不播放视频只是它显示的白页只...如何在所有浏览器播放视频,请帮助我..如何在IE8浏览器中播放html5视频

这里是我的代码,我所做的在我的网页

<video controls="controls" poster="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg" 
    width="640" height="360"> 
    <source src="../../Videos/Nenu Nuvvuantu - Orange - MyInfoland.mp4" type="video/mp4" /> 
    <%-- <source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm" type="video/webm" />--%> 
    <source src="../../Videos/Nenu Nuvvuantu - Orange - MyInfoland.ogv" type="video/ogv" /> 
    <object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" 
     width="640" height="360"> 
     <param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" /> 
     <param name="allowFullScreen" value="true" /> 
     <param name="wmode" value="transparent" /> 
     <param name="flashVars" value="config={'playlist':['http%3A%2F%2Fsandbox.thewikies.com%2Fvfe-generator%2Fimages%2Fbig-buck-bunny_poster.jpg',{'url':'../../Videos/Nenu Nuvvuantu - Orange - MyInfoland.mp4','autoPlay':false}]}" /> 
     <img alt="Big Buck Bunny" src="http://sandbox.thewikies.com/vfe-generator/images/big-buck-bunny_poster.jpg" 
      width="640" height="360" title="No video playback capabilities, please download the video below" /> 
    </object> 
</video> 
+0

你的标题是指html5视频,但你的问题是关于Flash视频,不是吗? – greg

回答

40

有一个很好的标准方式通过Flash和其他回退来设置HTML5视频。

请参阅Video for Everybody以获得一个带有备用选项的HTML5标签的良好生成器。

或者,这里是another great library, with JS/CSS code to make it work consistently

+0

嗨,谢谢youuu somuch它正在工作..实际上我已经在我的本地系统测试这个视频,因为我给src =“从我的服务器路径”,那么我怎么玩这个。因为在这个链接,他给了源http:// url ... insted这是什么我给src路径..please – jesse

+0

我想回答,但我很困惑你在问什么。对于任一版本,您只需要一个文件的绝对路径。如果您正在测试本地版本,请使用'file:// << path_to_file >>',其中'<< path_to_file>'应该是完整路径。 – OverZealous

+0

好吧,我已经发布我的修改后的代码在我的问题,请检查一次..我想改变这个网址“ jesse

0

我已经使用下面的方式来解决IE浏览器的播放问题,这对我很有帮助。

<video id=0 controls width="640" height="360"> 
<source src="new/db.ogv" type='video/ogg; codecs="theora, vorbis"'/> 
<source src="new/db.webm" type='video/webm' > 
<source src="new/db.mp4" type='video/mp4'> 
<object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="500" height="500"> 
    <param name="movie" value="db.swf"> 
    <param name="quality" value="high"> 
    <param name="wmode" value="opaque"> 
    <param name="swfversion" value="11.0.0.0"> 
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> 
    <param name="expressinstall" value="../../Scripts/expressInstall.swf"> 
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> 
    <!--[if !IE]>--> 
    <object type="application/x-shockwave-flash" data="db.swf" width="500" height="500"> 
    <!--<![endif]--> 
    <param name="quality" value="high"> 
    <param name="wmode" value="opaque"> 
    <param name="swfversion" value="11.0.0.0"> 
    <param name="expressinstall" value="../../Scripts/expressInstall.swf"> 
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> 
    <div> 
     <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> 
     <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p> 
    </div> 
    <!--[if !IE]>--> 
    </object> 
    <!--<![endif]--> 
</object> 

</video> 

<script type="text/javascript">swfobject.registerObject("FlashID");</script> 
<script src="../../Scripts/swfobject_modified.js" type="text/javascript"></script> 

//你可以在这里下载

http://code.google.com/p/fanarshavin/downloads/detail?name=swfobject_modified.js&can=2&q=

-1

swfobject_modified我失败了视频之间的页面上JWPlayer在IE8中切换。而且,它的JS API在IE8中不起作用。 也有顶级选手:medialement,VideoJS,SublimeVideo。所以,我现在正在尝试mediaelement。

相关问题