视频测试

4631人浏览 / 0人评论
<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('https://cn2.kankia.com/hls/20191228/0939d69e664a2e37d55885e62ffc0bc4/1577527664/index.m3u8');
    hls.attachMedia(video);
    hls.on(Hls.Events.MANIFEST_PARSED,function() {
      video.play();
  });
 }
</script>

 

全部评论