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

Record video and audio together on the web using getUserMedia

Notifications You must be signed in to change notification settings

H0201030/record-rtc-together

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Record video and audio together on the web using getUserMedia

Resources

Stars

Watchers

Forks

Packages

No packages published