WebRTC-Experiment
WebRTC-Experiment copied to clipboard
MultiStreamRecorder has no destroy method
I was able to get my multi-stream issue resolved using MultiStreamRecorder - I'm able to capture participant audio in a WebRTC video chat session and combine that audio with an audio/video screen capture, using captureStream
for the participant audio and getDisplayMedia
for the screen and finally getUserMedia
for the screen (mic) audio of the person recording.
However, I'm to the step in the process where I'm ready to destroy the recorder once I'm done, but there doesn't appear to be a method to do this. I'm establishing the recorder like so:
let recorder = new MultiStreamRecorder([screenCaptureStream, participantStream],
{
mimeType: "video/webm",
video: {
width: 1920,
height: 1080
},
audio: true
});
recorder.record();
I'm using React, so my recorder
(and most of the related objects) are stored in state
for passing between methods, so I can just set the recorder state
to null
, which I think would effectively "destroy" it, but RecordRTC
has a method for destroy.
What am I missing?