WhammyRecorder(mediaStream, config)

new WhammyRecorder(mediaStream, config)

Video recording feature in Chrome.

WhammyRecorder is a standalone class used by RecordRTC to bring video recording in Chrome. It runs top over Whammy.

Parameters:
Name Type Description
mediaStream MediaStream

MediaStream object fetched using getUserMedia API or generated using captureStreamUntilEnded or WebAudio API.

config object

{disableLogs: true, initCallback: function, video: HTMLVideoElement, etc.}

Author:
License:
Source:
See:
Example
var recorder = new WhammyRecorder(mediaStream);
recorder.record();
recorder.stop(function(blob) {
    video.src = URL.createObjectURL(blob);
});

Methods

(static) this.clearRecordedData()

This method resets currently recorded data.

This method resets currently recorded data.

Source:
Example
recorder.clearRecordedData();

(static) this.pause()

This method pauses the recording process.

This method pauses the recording process.

Source:
Example
recorder.pause();

(static) this.record()

This method records video.

This method records video.

Source:
Example
recorder.record();

(static) this.resume()

This method resumes the recording process.

This method resumes the recording process.

Source:
Example
recorder.resume();

(static) this.stop(callback)

This method stops recording video.

This method stops recording video.

Parameters:
Name Type Description
callback function

Callback function, that is used to pass recorded blob back to the callee.

Source:
Example
recorder.stop(function(blob) {
    video.src = URL.createObjectURL(blob);
});

(inner) drawFrames(frameInterval)

Draw and push frames to Whammy

.

Draw and push frames to Whammy

Parameters:
Name Type Description
frameInterval integer

set minimum interval (in milliseconds) between each time we push a frame to Whammy

Source:

(inner) dropBlackFrames(_frames, _framesToCheck, _pixTolerance, _frameTolerance) → {Array}

remove black frames from the beginning to the specified frame

.

remove black frames from the beginning to the specified frame

Parameters:
Name Type Description
_frames Array

array of frames to be checked

_framesToCheck number

number of frame until check will be executed (-1 - will drop all frames until frame not matched will be found)

_pixTolerance number

0 - very strict (only black pixel color) ; 1 - all

_frameTolerance number

0 - very strict (only black frame color) ; 1 - all

Source:
Returns:
  • array of frames
Type
Array