Rate this page:

Recorder

Represents an audio recorder. Add the following line to your scenario code to use the class:

require(Modules.Recorder);

Methods

addEventListener

Copy URL
addEventListener(event: 

RecorderEvents

,
callback:

Function

):

void

Adds handler for specific event generated by Recorder. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler will be called.

Parameters

  • Event class (i.e., RecorderEvents.Stopped)

  • callback:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • type:

    void

mute

Copy URL
mute(doMute: 

boolean

):

void

Mute/unmute whole record without detaching media sources from it

Parameters

  • doMute:

    boolean

    Mute/unmute switch

Returns

  • type:

    void

removeEventListener

Copy URL
removeEventListener(event: 

RecorderEvents

,
callback:

Function

):

any

Removes handler for specific event generated by Recorder

Parameters

  • Event class (i.e., RecorderEvents.Stopped)

  • callback:

    Function

    Optional

    Handler function. If not specified, all event listeners are removed

Returns

  • type:

    any

stop

Copy URL
stop(): 

void

Stop recording and triggers the RecorderEvents.Stopped event.

Returns

  • type:

    void