I am working on a screen capture application and am able to get the ondataavailable
event work and get data in chunks which I am further converting as a blob but when I send the same data stream over websocket to server and save the stream as a webm file to disk and later play the file, the file doesn't play anything. I think the file needs some meta information which I am not sure of.
Any suggestions?
Here's my javascript code:
socket.emit('message', new Blob([event.data], {type: 'video/webm'}));
Server saving code :
fs.writeFile("d://test.webm", data, "binary", function(err) { });