如何在IE8浏览器中播放html5视频

发布于 2024-11-27 15:30:02 字数 1506 浏览 0 评论 0原文

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

这是我在页面中所做的代码

<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>

I have develop a MVC3 Application in that i have use html5 video controls when i run the application it is playin Chrome but when i try to play in IE8 Browser it doesn't play the video just it show the white page only...How to play the video in all Browsers please help me..

Here is my code what i did in my page

<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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

纵情客 2024-12-04 15:30:02

有一种很好的标准方法可以使用 Flash 和其他后备设置 HTML5 视频。

请参阅适合所有人的视频,了解带有后备选项的 HTML5 标记生成器。

或者,这里有另一个很棒的库,带有 JS/CSS 代码以使其一致工作

There's a nice standard way of setting up HTML5 video with flash and other fallbacks.

Please see Video for Everybody for a nice generator of HTML5 tags with fallback options.

Alternatively, here's another great library, with JS/CSS code to make it work consistently.

So要识趣 2024-12-04 15:30:02

我使用以下方法来修复 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>

// 您可以在此处下载 swfobject_modified

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

I have used following way to fix playback issue for IE and this worked for me.

<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>

// you can download swfobject_modified here

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

晨光如昨 2024-12-04 15:30:02

我无法在 IE8 中使用 JWPlayer 切换页面上的视频。而且,它的 JS API 在 IE8 中根本不起作用。
还有顶级播放器:medialement、VideoJS、SublimeVideo。所以,我现在正在尝试 mediaelement。

I'm failed to switch between videos on page with JWPlayer in IE8. Moreover, its JS API simply doesn't work in IE8.
There are also top players: medialement, VideoJS, SublimeVideo. So, I'm trying mediaelement now.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文