javascript-media-recorder
javascript-media-recorder copied to clipboard
recording all streams in a multiparty call
Presently your demo only provide for recording one stream(audio+video). But i want to record audio of all parties participating in the conversation.
@utkarshmaximess , so you have streams (audio and video) and you want to record audio tracks from each of callers?
You need to create a MediaStream and attach audio tracks.
var streamForRecord = new MediaStream();
stream.getAudioTracks.forEach(function(track) {
streamForRecord.addTrack(track);
});
var rec1 = new qbMediaRecorder(streamForRecord);
Something like this.
Multiple audio tracks added with addTrack (like suggested by dimaspirit) are not supported in webm. Only first added audio track is effectively recorded. I just wanted to record 1 callee video but audio tracks for both 1 caller and 1 callee. Any solution for this?
You somehow need to convert all audio tracks into one before recording. check out web audio api, https://developer.mozilla.org/en-US/docs/Web/API/ChannelMergerNode