streamproc / MediaStreamRecorder

Cross browser audio/video/screen recording. It supports Chrome, Firefox, Opera and Microsoft Edge. It even works on Android browsers. It follows latest MediaRecorder API standards and provides similar APIs.
https://www.webrtc-experiment.com/msr/
MIT License
2.63k stars 562 forks source link

Audio-Recording modules #1

Open muaz-khan opened 11 years ago

muaz-khan commented 11 years ago
  1. Use MediaRecorder API to record audio; if available
  2. Otherwise; use Web Audio API (something like Recorderjs) to record stereo audio in WAV format
  3. Fallback to jRecorder for chrome & mono audio

    Syntax Hints
var recordMediaStream = new RecordMediaStream( MediaStream );

recordMediaStream.ondataavailable = function(e) {
     // e.data ---- type: Blob
};

recordMediaStream.onstop = function() { }

// void start(optional long timeSlice)
// timestamp to fire "ondataavailable"
recordMediaStream.start(interval);

recordMediaStream.stop();

For further events and methods: https://dvcs.w3.org/hg/dap/raw-file/tip/media-stream-capture/MediaRecorder.html

We need to decide whether storing data in Blob is better; or ArrayBuffer should be used. Read this thread for further info.

What about this flash-based recorder.js?

What about wami-recorder?

Need to list other available options & scenarios.

Platforms & Devices

  1. Chrome for Desktop (Windows/Mac/Unix)
  2. Firefox for Desktop (Windows/Mac/Unix)
  3. Chrome Beta for Android
neizerth commented 11 years ago

I dont know about memory usage with ArrayBuffer. I think we need to check it and compare with blob.

I think that recorder.js is good as jRecorder. I'll compare all features about 2 solutions and write about.

Also, with jRecorder/Recorder.js we can use our solution in Opera/IE

neizerth commented 11 years ago

About wami - Recorder.js and jRecorder better cause they supports many callbacks.

neizerth commented 11 years ago

I request to use same API as you wrote above:

var audioRecorder = new AudioStreamRecorder( );

audioRecorder.ondataavailable = function(e) {

};

audioRecorder.onstop = function() { }

// void start(optional long timeSlice)
// timestamp to fire "ondataavailable"
audioRecorder.start(interval);

audioRecorder.stop();

I dont know that passing wav record from Flash to JS will be a good practice for memory usage but can do this option. Also i'll test it :)