ReadingSystemEngine

Functions

Link copied to clipboard

Adds an instance of OnLicenseEventListener to receive events related to Colibrio License Server validation.

Link copied to clipboard
abstract suspend fun createSyncMediaPlayer(colibrioAudioPlayer: ColibrioAudioPlayer): ColibrioResult<SyncMediaPlayer>

Creates a new SyncMediaPlayer from an existing ColibrioAudioPlayer.

abstract suspend fun createSyncMediaPlayer(timeline: SyncMediaTimeline, options: SyncMediaPlayerCreateOptions = SyncMediaPlayerCreateOptions()): ColibrioResult<SyncMediaPlayer>

Creates a new SyncMediaPlayer. Use for playing synchronized media such as EPUB Media Overlays or TTS (Text-To-Speech). You can create SyncMediaTimeline instances from publications using the format specific ReaderPublication instances. For example EpubReaderPublication.createMediaOverlaySyncMediaTimeline() or PdfReaderPublication.createTtsSyncMediaTimeline()`.

Link copied to clipboard
abstract suspend fun createZipResourceProvider(dataSource: RandomAccessDataSource, zipResourceProviderOptions: ZipResourceProviderOptions = ZipResourceProviderOptions()): ColibrioResult<ZipResourceProvider>
abstract fun createZipResourceProvider(dataSource: RandomAccessDataSource, zipResourceProviderOptions: ZipResourceProviderOptions = ZipResourceProviderOptions(), onSuccess: (ZipResourceProvider) -> Unit, onError: (ColibrioException) -> Unit)

Creates a new ZipResourceProvider using byte data provided by dataSource. The dataSource must return data from a valid ZIP file, such as an EPUB file for example.

Link copied to clipboard

Destroys a SyncMediaPlayer created using this ReadingSystemEngine. Throws an error if the SyncMediaPlayer was not created using this ReadingSystemEngine.

Link copied to clipboard
abstract fun loadEpub(config: EpubResourceProviderLoadConfig, onSuccess: (EpubReaderPublication) -> Unit, onError: (ColibrioException) -> Unit)

Loads an EPUB file into the ReadingSystemEngine.

Link copied to clipboard
abstract fun loadPdf(config: PdfRandomAccessDataSourceLoadConfig, onSuccess: (PdfReaderPublication) -> Unit, onError: (ColibrioException) -> Unit)

Loads a PDF file into the ReadingSystemEngine.

Link copied to clipboard

Used to load an EPUB publication into the reading system. If successful, onSuccess is called with the loaded EpubReaderPublication, else onError will be called.

Used to load a PDF publication into the reading system. If successful, onSuccess is called with the loaded PdfReaderPublication, else onError will be called.

Link copied to clipboard

Removes a previously added instance of OnLicenseEventListener.

Link copied to clipboard
abstract fun unloadPublication(readerPublication: ReaderPublication)

Unloads readerPublication from the reading system. readerPublication must have been loaded using this ReadingSystemEngine instance, and its readerDocuments must not currently be in use by readerView.

Properties

Link copied to clipboard

Gets the API that can be used for searching in ReaderDocuments.

Link copied to clipboard
Link copied to clipboard
abstract val readerView: ReaderView

The ReaderView is responsible for everything related to presentation and navigation of publication contents.

Link copied to clipboard

All SyncMediaPlayer instances created using this ReadingSystemEngine.