WpAudiobookReaderPublication

Format specific API for W3C Audiobook Web Publications.

In a WpAudiobookReaderPublication instance, the ReaderDocuments in spine represents audio resources and can therefore not be rendered by a ReaderView.

To play the Audiobook, use createSyncMediaTimeline() to create a SyncMediaTimeline instance which then can be loaded into a SyncMediaPlayer.

Functions

Link copied to clipboard
abstract suspend fun createSyncMediaTimeline(readerDocuments: List<ReaderDocument>, config: WpAudiobookSyncMediaTimelineConfiguration, progressCallback: (Double) -> Unit = {}): ColibrioResult<SyncMediaTimeline>
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.

Link copied to clipboard
abstract suspend fun createTtsSyncMediaTimeline(readerDocuments: List<ReaderDocument>, config: TtsSyncMediaTimelineConfiguration, progressCallback: (Double) -> Unit = {}): ColibrioResult<SyncMediaTimeline>
abstract fun createTtsSyncMediaTimeline(readerDocuments: List<ReaderDocument>, config: TtsSyncMediaTimelineConfiguration, onSuccess: (SyncMediaTimeline) -> Unit, onError: (ColibrioException) -> Unit, progressCallback: (Double) -> Unit = {})

Creates a new TTS SyncMediaTimeline from the specified list of ReaderDocuments. The resulting SyncMediaTimeline can be played using a SyncMediaPlayer.

Link copied to clipboard
abstract suspend fun fetchResourceData(resourceUrl: String): ColibrioResult<ByteArray>
abstract fun fetchResourceData(resourceUrl: String, onSuccess: (ByteArray) -> Unit, onError: (ColibrioException) -> Unit)

Fetches a resource from the source publication by URL.

Link copied to clipboard

Get a ContentLocation from a locator. Used for extracting location specific information from the publication.

Properties

Link copied to clipboard

The units of measure that can be used when creating ContentPositionTimeline objects using this publication.

Link copied to clipboard

The sync media formats available in this publication.

Link copied to clipboard
abstract val coverImageUrl: String?

The Url for the cover image of the book. Use this URL with fetchResourceData to fetch the cover image.

Link copied to clipboard

The base URL used when creating Locators pointing to content in this publication.

Link copied to clipboard
abstract val manifest: WpManifestData

The parsed and normalized Web Publication Manifest for this publication.

Link copied to clipboard

Errors found when the WP Publication Manifest was processed.

Link copied to clipboard

Gets/sets the options related to processing and presentation of the WpAudiobookReaderPublication.

Link copied to clipboard

The ResourceProvider instance used to fetch publication resources.

Link copied to clipboard

Additional information about the source publication such as preferred way to render its content, its metadata, etc.

Link copied to clipboard

Metadata extracted from this WpAudiobookReaderPublication. This is the same as doing sourcePublication.metadata as WpPublicationMetadata.

Link copied to clipboard
abstract val spine: List<ReaderDocument>

The ordered list of ReaderDocument instances in this publication.