Hls,http live Streaming is an apple-defined protocol for real-time streaming, and HLS is based on the Http protocol, which mainly consists of two parts: the m3u8 profile and the TS media file.
Because it is apple out of the video playback format, so the PC side in addition to safari other browsers basically do not support, Microsoft Edge launch on the support, is the specific support of each browser
Can see Android and iOS basically can think of all support, I use the hls.js to play
Item Https://github.com/video-dev/hls.js
The use of the way is also very simple, directly look at his example of the line, the main is to pass in the m3u8 description file, and then load TS file slice playback, the background TS file path to correct
<script src= "Https://cdn.jsdelivr.net/npm/[email protected]" ></script><video id= "video" ></ Video><script> if (hls.issupported ()) { var video = document.getElementById (' video '); var HLS = new HLs (); Hls.loadsource (' https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8 '); Hls.attachmedia (video); Hls.on (Hls.events.manifest_parsed,function () { video.play (); }); </script>
About H5 play HTTP Live streaming m3u8 format video