import OpusRecorderEngine from 'videojs-record/js/plugins/opus-recorder-plugin.js'
OpusRecorderEngine
Extends:
Audio-only engine for the opus-recorder library.
Audio is encoded using libopus.
Constructor Summary
Public Constructor | ||
public |
constructor(player: Player, options: Object) Creates an instance of this class. |
Member Summary
Public Members | ||
public |
The number of channels to record. |
|
public |
audioContext: * |
|
public |
|
|
public |
Mime-type for audio output. |
|
public |
Path to |
|
public |
The length of the buffer that the internal |
|
public |
config: {"numberOfChannels": *, "bufferLength": *, "encoderSampleRate": *, "encoderPath": *, "sourceNode": *} |
|
public |
Enables console logging for debugging purposes. |
|
public |
engine: * |
|
public |
inputStream: * |
|
public |
mediaType: * |
|
public |
Additional configuration options for the opus-recorder library. |
|
public |
Specifies the sample rate to encode at. |
Method Summary
Public Methods | ||
public |
pause() Pause recording. |
|
public |
resume() Resume recording. |
|
public |
Setup recording engine. |
|
public |
start() Start recording. |
|
public |
stop() Stop recording. |
Private Methods | ||
private |
onRecordingAvailable(data: Object) |
Inherited Summary
From class RecordEngine | ||
public |
recordedData: * |
|
public |
addFileInfo(fileObj: Blob | File) Add filename and timestamp to recorded file object. |
|
public |
destroy() Destroy engine. |
|
public |
Show save as dialog in browser so the user can store the recorded media locally. |
|
private |
dispose() Remove any temporary data and references to streams. |
|
private |
onStopRecording(data: blob) Invoked when recording is stopped and resulting stream is available. |
Public Constructors
public constructor(player: Player, options: Object) source
Creates an instance of this class.
Override:
RecordEngine#constructorParams:
Name | Type | Attribute | Description |
player | Player | The |
|
options | Object |
|
The key/value store of player options. |
Public Members
public audioChannels: number source
The number of channels to record. 1 = mono, 2 = stereo. Maximum 2 channels are supported.
public audioContext: * source
public audioSourceNode: * source
public audioType: string source
Mime-type for audio output. Also supports audio/wav
; but make sure
to use waveEncoder worker in that case.
public audioWorkerURL: string source
Path to encoderWorker.min.js
or waveWorker.min.js
worker
script.
public bufferSize: number source
The length of the buffer that the internal JavaScriptNode
uses to capture the audio. Can be tweaked if experiencing
performance issues.