A new source starts to open (also the same file again, and
Player.restart). state is the player's state at that moment,
as a PlayerState (pass it as ifCurrent or to
Player.isCurrent); previous names the source that was open
before it, null when nothing was.
The player's state as the source starts to open.
The source open before this one (null: nothing was open).
The source is loaded: its duration, tracks and seekability are known.
Once per opening, after its source.opening.
The player's state as the source became ready.
A source left playback: it played to its end (natural), was closed
(stopped), another source took its place (replaced), it could not
be played (error, with the failure text in error), or the player
quits (quit, sent only to a plugin that is running then). state is
that source's last state, with its last position, not the
player's current one.
The ended source's last state, as a PlayerState.
Why it left playback.
Optionalerror?: stringThe failure text, when reason is error and the player has one.
The data each SourceEvent carries, as the listener of Player.on gets it.
Remarks
stateis the SDK's PlayerState, not the player's wire shape, so it can be passed asifCurrentand to Player.isCurrent. The state of an opening or a ready is also taken intoplugin.player.statewhen it is newer than what the plugin has.Since
1.10.0