Event Listener
interface EventListener
Content copied to clipboard
Implement this listener to keep track of tracks being played
Functions
on Player State Changed
Link copied to clipboard
Triggered every time player state is changed
on Play Failed To Prepare
Link copied to clipboard
Triggered if the player failed to prepare this item for playback
on Play Item Began Playback
Link copied to clipboard
abstract fun onPlayItemBeganPlayback(waitingTime: Int, play: Play, bufferingTime: Long)
Content copied to clipboard
This event will be triggered when next item begins playback. The previous item may still be playing if crossfading is enabled
on Play Item Finished Playback
Link copied to clipboard
abstract fun onPlayItemFinishedPlayback(play: Play, reason: Int, timePlayed: Float, error: Exception?)
Content copied to clipboard
Triggered after a play item has finished playing or is ending soon. The item may still be playing if crossfading is enabled and the play reason is REACHED_END
on Play Item Ready For Playback
Link copied to clipboard
This event will be triggered when this item is cached and is ready for immediate playback
on Progress Update
Link copied to clipboard
abstract fun onProgressUpdate(play: Play, elapsedTime: Float, duration: Float)
Content copied to clipboard
Triggered every 500ms for progress updates on current playing item