PlayerEvents
Constants
Error
Triggered when playback has finished with an error
Parameters
error:
string
Error message
player:
Player that generated the event
PlaybackBuffering
Triggered when an audio file is playing faster than it is being loaded.
Parameters
player:
Player that generated the event
PlaybackFinished
Triggered when playback has finished successfully or with an error
Parameters
error:
string
OptionalOptional. Error message
player:
Player that generated the event
PlaybackMarkerReached
Triggered when Player.addMarker is reached
Parameters
offset:
number
The marker offset
player:
Player that generated the event
PlaybackReady
Triggers by the createURLPlayer and createTTSPlayer methods when
1) the audio file download to the Voximplant cache is finished;
2) the audio file is found in the cache (i.e., it is in the cache before).
Parameters
player:
Player that generated the event
Started
Triggered when playback is started. Note that if the createURLPlayer method is called with the onPause parameter set to true, the event is not triggered; it is triggered after the Player.resume method call.
Parameters
duration:
number
Playback duration
player:
Player that generated the event
Stopped
Triggers as a result of the Player.stop method call.
Parameters
player:
Player that generated the event