Home Reference Source
import RecordRTCEngine from 'videojs-record/js/engine/record-rtc.js'
public class | source

RecordRTCEngine

Extends:

ComponentRecordEngine → RecordRTCEngine

Direct Subclass:

WebmWasmEngine

Engine used with the MRecordRTC class in the RecordRTC library.

Member Summary

Public Members
public

debug: *

public

engine: *

public
public
public

Method Summary

Public Methods
public

Destroy engine.

public

Remove any temporary data and references to streams.

public

pause()

Pause recording.

public

resume()

Resume recording.

public

saveAs(name: object)

Show save as dialog in browser so the user can store the recorded media locally.

public

setup(stream: LocalMediaStream, mediaType: Object, debug: Boolean)

Setup recording engine.

public

start()

Start recording.

public

stop()

Stop recording.

Private Methods
private

onStopRecording(audioVideoURL: string, type: string)

Invoked when recording is stopped and resulting stream is available.

private

onTimeStamp(current: float, all: array)

Received new timestamp (when timeSlice option is enabled).

Inherited Summary

From class RecordEngine
public
public

addFileInfo(fileObj: Blob | File)

Add filename and timestamp to recorded file object.

public

Destroy engine.

public

saveAs(name: Object): void

Show save as dialog in browser so the user can store the recorded media locally.

private

Remove any temporary data and references to streams.

private

onStopRecording(data: blob)

Invoked when recording is stopped and resulting stream is available.

Public Members

public debug: * source

public engine: * source

public inputStream: * source

public mediaType: * source

public recordedData: * source

Override:

RecordEngine#recordedData

Public Methods

public destroy() source

Destroy engine.

Override:

RecordEngine#destroy

public dispose() source

Remove any temporary data and references to streams.

Override:

RecordEngine#dispose

public pause() source

Pause recording.

public resume() source

Resume recording.

public saveAs(name: object) source

Show save as dialog in browser so the user can store the recorded media locally.

Override:

RecordEngine#saveAs

Params:

NameTypeAttributeDescription
name object

Object with names for the particular blob(s) you want to save. File extensions are added automatically. For example: {'video': 'name-of-video-file'}. Supported keys are 'audio', 'video' and 'gif'.

Example:

// save video file as 'foo.webm'
player.record().saveAs({'video': 'foo'});

public setup(stream: LocalMediaStream, mediaType: Object, debug: Boolean) source

Setup recording engine.

Params:

NameTypeAttributeDescription
stream LocalMediaStream

Media stream to record.

mediaType Object

Object describing the media type of this engine.

debug Boolean

Indicating whether or not debug messages should be printed in the console.

public start() source

Start recording.

public stop() source

Stop recording. Result will be available async when onStopRecording is called.

Private Methods

private onStopRecording(audioVideoURL: string, type: string) source

Invoked when recording is stopped and resulting stream is available.

Override:

RecordEngine#onStopRecording

Params:

NameTypeAttributeDescription
audioVideoURL string

URI of the recorded Blob object, e.g. 'blob:http://localhost:8080/10100016-4248-9949-b0d6-0bb40db56eba'

type string

Media type, eg. 'video' or 'audio'.

private onTimeStamp(current: float, all: array) source

Received new timestamp (when timeSlice option is enabled).

Params:

NameTypeAttributeDescription
current float

Current timestamp.

all array

List of timestamps so far.