Class: MultiStreamRecorder

© Muaz Khan . @WebRTCWeb . Github . Latest issues . What's New?

new MultiStreamRecorder(mediaStreams, config)

Multi-videos recorder.

MultiStreamRecorder can record multiple videos in single container.
Parameters:
Name Type Description
mediaStreams MediaStreams Array of MediaStreams.
config object {disableLogs:true, frameInterval: 10, mimeType: "video/webm"}
Author:
License:
Source:
See:
Example
var options = {
    mimeType: 'video/webm',
		video: {
         width: 360,
         height: 240
     }
}
var recorder = new MultiStreamRecorder(ArrayOfMediaStreams, options);
recorder.record();
recorder.stop(function(blob) {
    video.src = URL.createObjectURL(blob);

    // or
    var blob = recorder.blob;
});

Methods

(static) this.addStream()

Add extra media-streams to existing recordings.
Source:
Example
recorder.addStream(MediaStream);

(static) this.clearRecordedData()

This method resets currently recorded data.
Source:
Example
recorder.clearRecordedData();

(static) this.pause()

This method pauses the recording process.
Source:
Example
recorder.pause();

(static) this.record()

This method records all MediaStreams.
Source:
Example
recorder.record();

(static) this.resume()

This method resumes the recording process.
Source:
Example
recorder.resume();

(static) this.stop(callback)

This method stops recording MediaStream.
Parameters:
Name Type Description
callback function Callback function, that is used to pass recorded blob back to the callee.
Source:
Example
recorder.stop(function(blob) {
    video.src = URL.createObjectURL(blob);
});