Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Latest commit

 

History

History
67 lines (43 loc) · 1.83 KB

README.markdown

File metadata and controls

67 lines (43 loc) · 1.83 KB

RecordRTC-together

Record video and audio together or individually on the web using getUserMedia.

Online Demo (Only works on Google Chrome)

It creates two files individually for video (webm at 10 fps) and audio (wav).

This is used in MIST project to allow users record video and audio together using their webcams on Web.

Quick Start

Include dist\RecordRTC-together.min.js in your web page.

    var constraints = { video: true, audio: true },
        recorder = new RecordRTC({
            enable: constraints,
            videoElem: document.getElementById("client-video")
        });

    // get and set user media
    recorder.getMedia(recorder.setMedia, function() {
        console.log("get user media failed!");
    });

    recorder.onVideoReady(function(blob) {
        // video blob in `webm`
    });

    recorder.onAudioReady(function(blob) {
        // audio blob in `wav`
    });

    recorder.start();

    recorder.stop();

Code for the demo please refer to src\index.html and src\js\main.js.

To merge video and audio, you can do it with ffmpeg on server:

$ ffmpeg -i video.webm -i audio.wav merged.mp4

Issues

RecordRTC-together is only tested in Google Chrome.

Use Issue page.

Credits

By Wang Zhuochun.

This is based on works from:

License

RecordRTC-together is released under MIT Licence.