html5 video 支持 m3u8格式如何实现?
hls.js
MSE-based HLS client - http://dailymotion.github.io/hls.js/demo
<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
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。