io.video.videokit.player.Player implementation keeps its internal state and
offers a way to register listener objects to listen to important events.
The player state can be retrieved with
player.state and, similar to our recorder
component, matches one of the constants in the
|State||Description||Has content||Is playing|
|Player has no content.|
|Player has content and will play it as soon as buffering is finished.|
|Player has content and is playing it.|
|Player has content and is ready to play it as soon as |
|Player has content but it is ready to play it.|
Player events are dispatched to a
io.video.videokit.player.PlayerListener that was
previously registered using
Listeners are very important to be up-to-date about the player state, handle errors and create a responsive UI. We describe the listener interface as comments in the interface description below.