OnSyncMediaPlayerEventListener

Used for events related to SyncMediaPlayer state changes.

Functions

Link copied to clipboard
abstract fun onEndReached()

Called when the ColibrioAudioPlayer has reached the end of the timeline.

Link copied to clipboard

Called when an error occurred in the ColibrioAudioPlayer.

Link copied to clipboard
abstract fun onPaused()

Called when the ColibrioAudioPlayer.paused property has changed to true, and playback has stopped.

Link copied to clipboard
abstract fun onPlay()

Called when the ColibrioAudioPlayer.paused property has changed to false. The player will resume playback when ready.

Link copied to clipboard

The synchronization state between the SyncMediaPlayer and the ReaderView has changed.

Link copied to clipboard
abstract fun onReady()

Called when the ColibrioAudioPlayer.ready property has changed to true. The player has enough data to start playing. If the paused property of the player is false, the playback will resume immediately.

Link copied to clipboard
abstract fun onSeeked(event: SyncMediaEngineEventData)

The player has seeked to a new position in the timeline.

Link copied to clipboard
abstract fun onSeeking(event: SyncMediaEngineEventData)

The player has started seeking to a new position in the timeline. The seeking operation has completed when onSeeked is called.

Link copied to clipboard

Called when a new segment is active in the player.

Link copied to clipboard

Called when the player has received additional information about a SyncMediaSegmentData's duration (such as after loading the media) and it did not match with the approximated value. The segment has been updated with the new duration value and the total duration of the timeline has also been updated.

Link copied to clipboard
abstract fun onTimelinePositionChanged(timelinePositionData: SyncMediaTimelinePositionData, approximateElapsedTimeMs: Int)

Called when SyncMediaPlayer.timelinePosition has changed. During playback, this method is called approximately every 200ms.

Link copied to clipboard

Called when the player is waiting for data to be loaded. The player will call onReady when it is no longer waiting for data to be loaded.