SIGN UP

PlayerEvents

Events

PlaybackFinished

The event is triggered when playback has finished successfully or in case of playback error

Parameters

  • error:

    string
    Optional

    Error message

  • player:

    Player

    Player that generated the event

PlaybackMarkerReached

The event is triggered when Player.addMarker is reached

Parameters

  • offset:

    Number

    The marker offset

  • player:

    Player

    Player that generated the event

PlaybackReady

The event is triggered by the createURLPlayer and createTTSPlayer methods when 1) the audio file download to the Voximpant cache is finished 2) the audio file is found in the cache (i.e., it was in the cache before).

Parameters

  • player:

    Player

    Player that generated the event

Started

The event is triggered when playback is started. Note that if the createURLPlayer method is called with the onPause parameter that is set to true, the event isn't triggered; it will be triggered after the Player.resume method call.

Parameters

  • player:

    Player

    Player that triggered the event

Stopped

The event is triggered as a result of the Player.stop method call.

Parameters

  • player:

    Player

    Player that triggered the event