【问题标题】:jwPlayer not working properly in IE 9 but works on chrome and ie 10jwPlayer 在 IE 9 中无法正常工作,但适用于 chrome 和 ie 10
【发布时间】:2013-05-01 13:46:11
【问题描述】:

我的自托管 jwplayer 不适用于 ie9,但它适用于 chrome 和 ie 10。你们可以提供的任何帮助将不胜感激。代码如下。

    <html>
    <head> 
    <title>HTML 5 RTMP Test</title> 
    <script src="/jwplayer/jwplayer.js"></script>
    <script>jwplayer.key="keycode=="</script>
    </head> 
    <body> 
    <div id="player">
    <a>Loading the player...</a>
    </div>
    <script type="text/javascript">
         jwplayer("player").setup({
         width: "461",
         height: "282",
         primary: "flash",
         autostart: "true",
         sources: [{
                   file: "rtmp://mydomain.com/livewebcast/v1/livestream",
               },{
                   file: "http://mydomain.com/v1/livestream/playlist.m3u8"
             }]
           });
    </script>
    </body> 
    </html>

【问题讨论】:

  • 您是否安装了适用于 IE9 的 Flash?我看不出有什么理由说明这会中断。
  • 是的,我确实为 ie9 安装了 flash,这里是页面的链接:jaxdev.net/jwvod.html
  • 我看到问题,将在下面回答。

标签: internet-explorer-9 jwplayer internet-explorer-10


【解决方案1】:

我刚刚使用此代码在本地进行了测试,它可以工作:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HTML 5 RTMP Test</title> 
<script src="http://www.longtailvideo.com/jwplayer/jwplayer.js"></script>
<script>jwplayer.key="l48FHv8PjETbc5w2agtD9xbH/+6TpnnXHRWRKg=="</script>
</head>
<body>
<div id="player">
<a>Loading the player...</a>
</div>
<script type="text/javascript">
    jwplayer("player").setup({
    width: "650",
    height: "360",
    primary: "flash",
    autostart: "true",
    sources: [{
            file: "rtmp://mywebsite.com:1935/vod/sample.mp4",
        },{
            file: "http://mywebsite.com:1935/tphimvod/mp4:sample.mp4/playlist.m3u8"
        }]
    });
</script>
</body>
</html>

【讨论】:

  • 感激不尽,非常感谢您的快速回复。哪里出错了?
  • 我只是更改了文档类型,就是这样。代码完全没问题:)
  • 刚刚捐赠给您的网站。我还有一个要求。我有一个安装了 jwplayer 的 WordPress 站点,我如何使用 WordPress 完成同样的事情。
  • 谢谢!如果您使用的是 WP,您只需要确保您使用的主题具有此文档类型 -
  • 再次感谢您的捐赠。你是第一个这样做的人 :) 所以我想再次深深地感谢你,这对我来说真的很重要。 :-) !
猜你喜欢
  • 2019-12-13
  • 1970-01-01
  • 1970-01-01
  • 2014-08-17
  • 1970-01-01
  • 2012-12-10
  • 1970-01-01
  • 2017-12-10
  • 1970-01-01
相关资源
最近更新 更多