MultiStreamRecorder.js & MediaStreamRecorder

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

Getting both audio/video blobs in single "ondataavailable" event using MediaStreamRecorder

ms
// cdn.webrtc-experiment.com/MediaStreamRecorder.js
var mediaConstraints = {
    audio: true,
    video: true
};

navigator.getUserMedia(mediaConstraints, onMediaSuccess, onMediaError);

function onMediaSuccess(stream) {
    var multiStreamRecorder = new MultiStreamRecorder(stream);
    multiStreamRecorder.ondataavailable = function(blobs) {
        // blobs.audio
        // blobs.video
    };
    multiStreamRecorder.start(3000);
}

function onMediaError(e) {
    console.error('media error', e);
}
MediaStreamRecorder Demos

Latest Updates

Latest Issues

Feedback

Enter your email too; if you want "direct" reply!

Latest Updates