createSyncMediaTimeline

abstract fun createSyncMediaTimeline(readerDocuments: List<ReaderDocument>, config: WpAudiobookSyncMediaTimelineConfiguration, onSuccess: (SyncMediaTimeline) -> Unit, onError: (ColibrioException) -> Unit, progressCallback: (Double) -> Unit = {})

Creates a SyncMediaTimeline that can be used with a SyncMediaPlayer to play the contents of this audiobook.

Parameters

readerDocuments
  • The reader documents that should be part of the timeline.

config
  • Configuration of the SyncMediaTimeline.

progressCallback
  • A function called several times indicating the create progress as a value between 0 and 1.


abstract suspend fun createSyncMediaTimeline(readerDocuments: List<ReaderDocument>, config: WpAudiobookSyncMediaTimelineConfiguration, progressCallback: (Double) -> Unit = {}): ColibrioResult<SyncMediaTimeline>

Creates a SyncMediaTimeline that can be used with a SyncMediaPlayer to play the contents of this audiobook.

Return

Either ColibrioResult.Success when the SyncMediaTimeline has been created successfully, or ColibrioResult.Error if an error occurred while creating the timeline.

Parameters

readerDocuments
  • The reader documents that should be part of the timeline.

config
  • Configuration of the SyncMediaTimeline.

progressCallback
  • A function called several times indicating the create progress as a value between 0 and 1.