![]() ![]() ![]() This is an example of how a m3u8 file would look like. Couple of the advantages of using HLS is that it works faster than Flash, it is supported by many browser these days, and it unlocks the potential to stream live in 4k and 60 fps. By simply looking at them, hls.js would know which file should download next while playing. And, how does it know what file name it should download? Since, initially, the video will be load from a m3u8 file where it contains the metadata of the video itself. As the stream is played, it will continue on requesting more short chunk of the overall stream. So, how does hls.js works? It works by breaking the overall stream into a sequence of small HTTP-based file downloads, each download loading one short chunk of an overall stream. ![]() (assuming your browser supported it, check here). What is great about hls.js is that it does not need any player, it works directly on top of a standard HTML element. It relies on HTML5 video and MediaSource Extensions for playback. hls.js is a JavaScript library which implements a HTTP Live Streaming client. Today, I am going to show you guys how to play mp4 video using hls.js. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |