Audio+Video Recording using MediaRecorder / Source Code

Copyright © 2013 Muaz Khan<@muazkh>.

Support: Firefox Nightly / Download

Limitation: Only audio-recording is available (...audio+video recording coming soon)

<script src="https://www.webrtc-experiment.com/AudioVideoRecorder.js"></script>

AudioVideoRecorder({

    // MediaStream object
    stream: MediaStream,

    // mime-type of the output blob
    mimeType: 'audio/ogg',

    // set time-interval to get the blob
    interval: 5000,

    // get access to the recorded blob
    onRecordedMedia: function (blob) {
        // POST/PUT blob using FormData/XMLHttpRequest

        // or set download URL
        hyperlink.href = URL.createObjectURL(blob);
    }

});


Feedback