Recorder
Represents an audio and video recorder. Add the following line to your scenario code to use the class:
require(Modules.Recorder);
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified RecorderEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called
Parameters
event:
Event class (i.e., RecorderEvents.Stopped)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
id
id(): string
Returns the recorder's id.
Returns
type:
string
mute
mute(doMute: boolean
): void
Whether to mute whole record without detaching media sources from it
Parameters
doMute:
boolean
Mute/unmute switch
Returns
type:
void
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified RecorderEvents event
Parameters
event:
Event class (i.e., RecorderEvents.Stopped)
callback:
Function
OptionalHandler function. If not specified, all event listeners are removed
Returns
type:
void
stop
stop(): void
Stops recording and triggers the RecorderEvents.Stopped event.
Returns
type:
void