fent / node-m3u8stream

Concatenates segments from a m3u8/dash-mpd playlist into a consumable stream.
MIT License
217 stars 54 forks source link

m3u8stream() to web player #58

Closed NadirRed closed 4 years ago

NadirRed commented 4 years ago

Hi, i was following this tutorial https://medium.com/better-programming/video-stream-with-node-js-and-html5-320b3191a6b6 so i want to ask if it is possible to : pass the data from m3u8stream() directly to web player (using express) then play it on html page like this :

<video id="videoPlayer" controls>  
<source src="http://localhost:3000/video" type="video/mp4">
</video>

(im still learning nodejs) sorry if its not allowed to post this kind of questions Thank you.

fent commented 4 years ago

I haven't tried that myself, but I don't see why not. note that the player won't support seeking, you'd have to add that yourself.

tbh, there are better libraries out there made in mind for web players