Class: Easyrtc_Recorder

Easyrtc_Recorder

new Easyrtc_Recorder()

Provides methods for building MediaStream recorders.
Source:

Methods

(static) easyrtc.isRecordingTypeSupported(codecName,)

Check if a particular codec can be used for recording.
Parameters:
Name Type Description
codecName, String either "vp8" or "vp9 or "h264"
Source:
Returns:
true if the type can be used, or if the browser doesn't support a method to find out.

(static) easyrtc.recordToBlob(mediaStream, blobCallback)

This method creates a media recorder that builds a blob Use the media recorder's start(), stop(), pause() and resume() methods on the returned object.
Parameters:
Name Type Description
mediaStream HTMLMediaStream a local or remote media stream.
blobCallback function a callback function that gets called with a blob once you invoke the stop method.
Source:

(static) easyrtc.recordToCallback(mediaStream, dataCallback)

This method creates a media recorder and populates it's ondataavailable method so that your own callback gets called with the data. Use the media recorder's start(), stop(), pause() and resume() methods on the returned object.
Parameters:
Name Type Description
mediaStream HTMLMediaStream a local or remote media stream.
dataCallback function a function to receive the webm data from.
Source:

(static) easyrtc.recordToFile(a, downloadLink, basename)

This method creates a media recorder that builds a file. Use the media recorder's start(), stop(), pause() and resume() methods on the returned object.
Parameters:
Name Type Description
a HTMLMediaStream local or remote media stream.
downloadLink Object an anchor tag to attach the file to.
basename String the name of the file. A .webm will be appended to the file if its not already present. The file doesn't get written until you call the mediaRecorder's stop method.
Source:

(static) easyrtc.setRecordingVideoCodec(codecName,)

Set the desired codec for the video encoding.
Parameters:
Name Type Description
codecName, String either "vp8" or "vp9 or "h264"
Source:
Returns:
true if the type can be used.

(static) easyrtc.supportsRecording()

Determines if recording is supported by the browser.
Source:
Returns:
true if recording is supported.

(static) startRecording(mediaStream)

Create a recording object and attach a media stream to it.
Parameters:
Name Type Description
mediaStream HTMLMediaStream
Source:
Returns:
a recorder object or null if recording not supported.