Hi, I'm trying to save the blob files in a given interval on the server and link them to create a single file.
The scenario is this: A video conference with 5 participants, the conference is being recorded every 60 seconds and loads the blob on the server and chained to the previous to create 5 files (one for each participant)
On the client side:
var stream = ss.createStream(); ss(socket).emit('file:add:stream', stream, elem, roomId); var blobReadStream = ss.createBlobReadStream(video); console.debug(blobReadStream); blobReadStream.pipe(stream); console.debug(stream); ss(socket).on('file:add:stream:success', function(data) { console.info('file uploaded to server'); });
Hi, I'm trying to save the blob files in a given interval on the server and link them to create a single file.
The scenario is this: A video conference with 5 participants, the conference is being recorded every 60 seconds and loads the blob on the server and chained to the previous to create 5 files (one for each participant)
On the client side:
var stream = ss.createStream(); ss(socket).emit('file:add:stream', stream, elem, roomId); var blobReadStream = ss.createBlobReadStream(video); console.debug(blobReadStream); blobReadStream.pipe(stream); console.debug(stream); ss(socket).on('file:add:stream:success', function(data) { console.info('file uploaded to server'); });
The server side:
ss(socket).on("file:add:stream", function(stream, data, roomId) { console.log(stream); var dataStream = fs.createWriteStream('./public/uploads/'+roomId+"/"+data+".webm", { 'flags': 'a' }); stream.pipe(dataStream); ss(socket).emit('file:add:stream:success'); });
Can you help me figure out the error? Thanks