【问题标题】:What am I missing to have this appear in IE8?我错过了什么让这个出现在 IE8 中?
【发布时间】:2015-04-15 14:00:14
【问题描述】:

我在这样的网页上有几个 video-js 播放器代码:

<video id="vid1" class="video-js vjs-default-skin" width="140" height="120"
controls poster="/1video/countdown.jpg" data-setup='{}'>
<source src="/video/test.mp4" type="video/mp4" />
</video>

在标题中:

 <link href="/video-js-4.12.5/video-js/video-js.css" rel="stylesheet">
 <script src="/video-js-4.12.5/video-js/video.js"></script>
 <script>videojs.options.flash.swf = "/video-js-4.12.5/video-js/video-js.swf"</script>

我需要添加什么才能让播放器出现在 IE8 中?任何帮助将不胜感激。

【问题讨论】:

标签: javascript internet-explorer-8 html5-video video.js


【解决方案1】:

很遗憾,Internet Explorer 8 不支持您正在使用的 &lt;video/&gt; 标记。

Source

更新

video.js 在不支持 HTML5 视频的浏览器(例如 IE 8)中加载时应该回退到 Flash。你的不工作可能有几个原因:

  1. Ensure that poster image is set
  2. Use a self hosted version of video.js rather than the CDN. Then ensure that your path to video-js.swf is accurate within the JS file
  3. Ensure that your flash plugin is up-to-date

没有。 2 可能与您的问题最相关。我在您的标题中看到您尝试更改选项。也许尝试删除它并确保 video.js 中的文件路径是准确的(打开 JS 文件并搜索 video-js.swf)。

【讨论】:

  • 感谢您的回复。我知道 IE8 不支持
  • 感谢您的回复。
  • @ChrisJames 有没有帮助您找到问题的解决方案?
  • 我相信我有自托管版本。我的海报图片如下所示: poster="..com/video/countdown.jpg" 我的 swf 文件的路径是这样的:
  • @ChrisJames 与其在标题的脚本标签中指定 video-js.swf 文件的路径,不如直接检查 video-js 文件。在该文件中,您将找到指定 video-js.swf 文件所在位置的行。我的回答中第 2 项下的链接谈到了这个解决方案。
猜你喜欢
  • 2018-10-23
  • 2014-07-23
  • 1970-01-01
  • 2012-05-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-06-07
相关资源
最近更新 更多