EpubReaderPublication

Format specific API for an EPUB ReaderPublication.

Functions

Link copied to clipboard
abstract suspend fun createContentPositionTimeline(readerDocuments: List<ReaderDocument>, options: EpubContentPositionTimelineOptions = EpubContentPositionTimelineOptions.Characters(), progressCallback: (Double) -> Unit = {}): ColibrioResult<ContentPositionTimeline>
abstract fun createContentPositionTimeline(readerDocuments: List<ReaderDocument>, options: EpubContentPositionTimelineOptions = EpubContentPositionTimelineOptions.Characters(), onSuccess: (ContentPositionTimeline) -> Unit, onError: (ColibrioException) -> Unit, progressCallback: (Double) -> Unit = {})

Creates a new ContentPositionTimeline using the specified readerDocuments. A ContentPositionTimeline is used for describing positions in ReaderPublication content as integers.

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

Creates a new EPUB Media Overlay SyncMediaTimeline if available in the publication.

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

Destroys a SyncMediaTimeline instance that was previously created with this publication.

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

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

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 EPUB publication. This is the same as doing sourcePublication.metadata as EpubPublicationMetadata.

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

The ordered list of ReaderDocument instances in this publication.