Linked Questions

Popular Questions

how to make node js online video streaming

Asked by At

here is my node js code

        let  readStream = fs.createReadStream(__dirname+'/video.mp4');


and here is the client side

            let chunkArray = [];
            socket.on('stream-chunk', (chunk) => { 
                    //var url = URL.createObjectURL(chunk);


so as you can see I just want to get a video file from node server and stream it using buffers.. so far the chunks come as ArrayBuffers to client side. But I have no idea how to make use this incoming chunks to my html5 <video> element

here is my client side html tag

<video controls type="video/mp4" src="" id="video" width="300" height="300"></video>

Related Questions