RealtimeTTSPlayer
Constructors
Methods
addEventListener(event: , callback: Function
): void
Adds a handler for the specified PlayerEvents 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., PlayerEvents.PlaybackFinished)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
id(): string
Returns the player's id.
Returns
type:
string
pause(): void
Pauses playback. To continue the playback use the Player.resume method.
Returns
type:
void
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified PlayerEvents event.
Parameters
event:
Event class (i.e., PlayerEvents.PlaybackFinished)
callback:
Function
OptionalOptional. Handler function. If not specified, all handler functions are removed
Returns
type:
void
send(parameters: ): void
Sends a message object to the VoxTTS provider context.
Parameters
parameters:
Object that provides the parameters directly to the VoxTTS provider context.
Returns
type:
void
sendMediaTo(mediaUnit: , parameters: ): void
Starts sending media from the player to the media unit.
Parameters
mediaUnit:
Media unit that receives media
parameters:
OptionalOptional. WebSocket interaction only parameters
Returns
type:
void
stop(): void
Stops playback. The current player's instance is destroyed.
Returns
type:
void
stopMediaTo(mediaUnit: ): void
Stops sending media from the player to the media unit.
Parameters
mediaUnit:
Media unit that does not need to receive media from this conference anymore
Returns
type:
void