带有videoJS的HSL无法在IE9上工作

HSL with videoJS not working on IE9

本文关键字:IE9 工作 videoJS HSL 带有      更新时间:2023-09-26

我有一个由Plex Media Server提供的m3u8流,当我查看chrome或FF时,它工作得很好,但当转到IE9上的页面时,它会说:The video could not be loaded, either because the server or network failed or because the format is not supported.

这是我使用的代码:

<!DOCTYPE html>
<html>
<head>
  <title>Video.js | HTML5 Video Player</title>
  <link href="video-js.css" rel="stylesheet" type="text/css">
  <script src="video.js"></script>
  <script>
    videojs.options.flash.swf = "video-js.swf";
  </script>
</head>
<body>
  <video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="264"
      poster="http://video-js.zencoder.com/oceans-clip.png" data-setup='{}'>
    <source src="http://ip:port/video/:/transcode/universal/start?path=http%3A%2F%2Fip%3Aport%2Flibrary%2Fmetadata%2F1&fastSeek=1&X-Plex-Platform=Internet+Explorer&offset=0" type='video/mp4' />
    <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
  </video>
</body>
</html>

我尝试添加以下插件:https://github.com/videojs/videojs-contrib-hls

但没有运气。有人知道我可能做错了什么吗?

从自述文件来看,videojs contrib hls不支持Internet Explorer<10不幸。我没有确切的细节,但这是因为这项技术需要比IE9更先进、性能更好的javascript。

顺便说一句,在您的代码中,mime类型是"video/mp4"。