zoukankan      html  css  js  c++  java
  • html5 video 支持 m3u8格式如何实现?

    hls.js

    MSE-based HLS client - 

    <script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script>
    <video id="video"></video>
    <script>
      if(Hls.isSupported()) {
        var video = document.getElementById('video');
        var hls = new Hls();
        hls.loadSource('http://www.streambox.fr/playlists/test_001/stream.m3u8');
        hls.attachMedia(video);
        hls.on(Hls.Events.MANIFEST_PARSED,function() {
          video.play();
      });
     }
    </script>
    转载信息:
    作者:匿名用户
    链接:https://www.zhihu.com/question/38839312/answer/143894748
    来源:知乎
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
  • 相关阅读:
    bzoj1648
    bzoj3404
    bzoj1650
    bzoj1625
    bzoj1606
    bzoj1464
    bzoj1572
    bzoj1617
    bzoj1092
    bzoj1091
  • 原文地址:https://www.cnblogs.com/MuZi0627/p/9631904.html
Copyright © 2011-2022 走看看