I played with node and websites and created a small test application that broadcasts audio using websockets. The server breaks mp3 using createReadStream, throttles the stream using node-throttle and accepts binary data using the "ws" module. On the client side, I pick up the pieces on the websocket and use decodeAudioData ( http://www.html5rocks.com/en/tutorials/webaudio/intro/ ) to decode and play the fragment. Everything works relatively normal.
What I was interested to do next was to stream video in the same way as the HTML5 tag. But I can not find any reference material on the Internet to achieve this in the same way as my audio test above.
Is there a video equivalent for "decodeAudioData"?
Can I transfer pieces of data to a video tag?
I have a similar sample that I took from ...
https://gist.github.com/paolorossi/1993068
But this is not quite what I am looking for. First of all, this does not seem to me streaming. The client downloads everything before playing. In addition, like my audio test, I want the stream to be throttled on the server side, so that when a new client connects, they join the video at any time in which it is currently located. those. 30 minutes or something else.
thanks
fatlog
source share