Package-level declarations

Types

Link copied to clipboard
class ActiveGestureTypeChangedEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.ACTIVE_GESTURE_TYPE_CHANGED_ENGINE_EVENT, val type: EngineEventDataType, val newGestureType: ReaderViewGestureType?, val oldGestureType: ReaderViewGestureType?) : ReaderViewEngineEventData

Used when ReaderView's active gesture type has changed.

Link copied to clipboard
Link copied to clipboard
class ColibrioReadingSystemView @JvmOverloads constructor(context: Context, attributeSet: AttributeSet? = null, defStyleArg: Int = 0) : FrameLayout, CoroutineScope

This view serves as an entry point for the Colibrio reading system. It encapsulates a WebView component responsible for rendering publication content and provides access to a ReadingSystemEngine instance.

Link copied to clipboard

A TtsSynthesizer implementation based on the Android Text to speech API android.speech.tts.TextToSpeech.

Used to customize utterances to be spoken by the ColibrioTtsSynthesizer

Link copied to clipboard

The default implementation of a WebChromeClient.

Link copied to clipboard
interface ContentLocation

Represents a location within a ReaderPublication and methods to extract information related to that location.

Link copied to clipboard

Used for fetching publication text content related to a ContentLocation.

Link copied to clipboard

A ContentPositionTimeline is used for describing positions within ReaderPublication content as integers. The timeline starts at position 0 and its length can be retrieved using the length property.

Link copied to clipboard

Describes the different units of measure that can be used with ContentPositionTimelines.

Link copied to clipboard

Used for decrypting publication resources, encrypted with a specific encryption method.

Link copied to clipboard
open class EngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.ENGINE_EVENT, val type: EngineEventDataType)
Link copied to clipboard

Used to identify the subtype of EngineEvent

Link copied to clipboard

Possible values for EngineEventData.type

Link copied to clipboard
data class EngineEventMediaResourceData(val isDataUrl: Boolean, val isRemoteUrl: Boolean, val mediaTypeCategory: MediaTypeCategory, val resourceUrl: String?)

Contains information about a media resource related with certain an EngineEvent.

Link copied to clipboard
open class EngineEventTargetData(val frameworkComponent: EngineEventTargetFrameworkComponent, val locator: SimpleLocatorData?, val mediaType: String, val nodeData: EngineEventTargetXmlElementNodeData?, val objectType: EngineEventTargetObjectType = EngineEventTargetObjectType.ENGINE_EVENT_TARGET, val readerDocumentIndexInSpine: Int?)

Contains information about the publication content targeted by an EngineEvent.

Link copied to clipboard

Describes the framework component that was the target of an EngineEvent.

Link copied to clipboard
open class EngineEventTargetNodeData(val nodeType: EngineEventTargetNodeType = EngineEventTargetNodeType.UNKNOWN, val parent: EngineEventTargetNodeData?)

Describes a node in the publication content that was a target for an event such as "pointerdown" or "click".

Link copied to clipboard

Describes the node types of EngineEventTargetNodeData instances.

Link copied to clipboard

Used to identify subtypes of EngineEventTarget

Link copied to clipboard
open class EngineEventTargetXmlElementNodeData(val nodeType: EngineEventTargetNodeType = EngineEventTargetNodeType.XML_ELEMENT, val parent: EngineEventTargetXmlElementNodeData?, val attributes: List<AttributeData>, val namespaceURI: String?, val nodeName: String, val prefix: String?) : EngineEventTargetNodeData

Describes an XML element in the publication content that was a target for an event such as "pointerdown" or "click".

Link copied to clipboard

Contains all metadata items extracted from an EPUB publication.

Link copied to clipboard
class EpubRandomAccessDataSourceLoadConfig(val publicationDataSource: RandomAccessDataSource, val readingSessionOptions: ReadingSessionOptions, val readerPublicationOptions: EpubReaderPublicationOptions = EpubReaderPublicationOptions(), val encryptionMethods: List<EncryptionMethod> = emptyList(), val zipResourceProviderOptions: ZipResourceProviderOptions = ZipResourceProviderOptions())

Used with ReadingSystemEngine.loadEpub to load EPUB publications using a RandomAccessDataSource.

Link copied to clipboard

Format specific API for an EPUB ReaderPublication.

Link copied to clipboard
class EpubResourceProviderLoadConfig(val resourceProvider: ResourceProvider, val readingSessionOptions: ReadingSessionOptions, val readerPublicationOptions: EpubReaderPublicationOptions = EpubReaderPublicationOptions(), val hashSignature: String, val encryptionMethods: List<EncryptionMethod> = emptyList())

Used with ReadingSystemEngine.loadEpub to load EPUB publications using a ResourceProvider.

Link copied to clipboard
data class FetchNavigationItemReferencesOptions(val collectionTypes: List<NavigationCollectionType>? = null, val greedy: Boolean = false)

Options for fetching navigation item references from a ContentLocation.

Link copied to clipboard
data class FocusOnReadingPositionOptions(val focusOnPageContainer: Boolean, val focusOnPageBodyElement: Boolean, val focusNearContentLocation: Boolean)

Options related to ReaderView.focusOnReadingPosition() deciding which elements should receive focus.

Link copied to clipboard
class KeyboardEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.KEYBOARD_ENGINE_EVENT, val type: EngineEventDataType, val code: String, val isComposing: Boolean, val key: String, val keyCode: Int, val location: Int, val modifiers: KeyboardModifierStates, val readerDocumentEventState: ReaderDocumentEventState, val repeated: Boolean, val target: EngineEventTargetData?, val userGenerated: Boolean) : ReaderViewEngineEventData

The serializable version of IKeyboardEngineEvent, used for "keydown" and "keyup" events.

Link copied to clipboard
data class KeyboardModifierStates(val alt: Boolean, val altGraph: Boolean, val capsLock: Boolean, val control: Boolean, val meta: Boolean, val numLock: Boolean, val os: Boolean, val scrollLock: Boolean, val shift: Boolean)

Contains the state of modifier keys for a IKeyboardEngineEvent.

Link copied to clipboard
class LicenseEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.LICENSE_ENGINE_EVENT, val type: EngineEventDataType, val publicationToken: String, val reason: String?, val userToken: String) : EngineEventData

Used for events related to Colibrio License Server validation.

class MediaOverlaySyncMediaTimelineConfiguration(val audioRendererOptions: SyncMediaAudioRendererOptions = SyncMediaAudioRendererOptions())

Configuration object used when creating SyncMediaTimeline objects for EPUB Media Overlays.

Link copied to clipboard
open class MouseEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.MOUSE_ENGINE_EVENT, val type: EngineEventDataType, val button: Int, val buttons: Int, val clientX: Double, val clientY: Double, val ctrlKey: Boolean, val mediaResource: EngineEventMediaResourceData?, val metaKey: Boolean, val pageX: Double, val pageY: Double, val readerDocumentEventState: ReaderDocumentEventState, val relativeClientX: Double, val relativeClientY: Double, val relativeScreenX: Double, val relativeScreenY: Double, val screenX: Double, val screenY: Double, val target: EngineEventTargetData?, val userGenerated: Boolean) : ReaderViewEngineEventData

The EngineEvent type used for "click" and "contextmenu" events.

Link copied to clipboard

Describes the navigation actions that can be performed on a ReaderView.

Link copied to clipboard

Describes the different type of navigation collections.

Link copied to clipboard
class NavigationEndedEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.NAVIGATION_ENDED_ENGINE_EVENT, val type: EngineEventDataType, val navigationAction: NavigationAction) : ReaderViewEngineEventData
Link copied to clipboard
class NavigationIntentEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.NAVIGATION_INTENT_ENGINE_EVENT, val type: EngineEventDataType, val internalNavigation: Boolean, val locator: SimpleLocatorData, val readerDocumentIndexInSpine: Int?, val relatedEvent: MouseEngineEventData?, val sourceReaderDocumentIndexInSpine: Int?) : ReaderViewEngineEventData
Link copied to clipboard
class NavigationStartedEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.NAVIGATION_STARTED_ENGINE_EVENT, val type: EngineEventDataType, val dueToRenderingConfigChanged: Boolean, val navigationAction: NavigationAction, val replacedOngoingNavigation: Boolean) : ReaderViewEngineEventData
Link copied to clipboard

Describes the contents in the ReaderView as a one-dimensional timeline of all pages.

Link copied to clipboard
data class PageProgressionTimelineData(val timelineType: PageProgressionTimelineType, val totalNumberOfPages: Int, val visibleTimelineRange: PageProgressionTimelineRangeData)

Represents the data in a PageProgressionTimeline.

Link copied to clipboard
data class PageProgressionTimelineOptions(val delayRecalculationUntilPagesVisible: Boolean = true, val enabled: Boolean = true, val forceCompleteRendition: Boolean = false)

Options set using IReaderViewOptions.pageProgressionTimelineOptions

Link copied to clipboard
data class PageProgressionTimelinePositionData(val offset: Double, val pageIndex: Int)

Describes a position within a PageProgressionTimeline

Link copied to clipboard

Describes a range in the PageProgressionTimeline.

Link copied to clipboard

Describes how a PageProgressionTimeline was calculated.

Link copied to clipboard

Contains all metadata items extracted from a PDF publication.

Link copied to clipboard
class PdfRandomAccessDataSourceLoadConfig(val publicationDataSource: RandomAccessDataSource, val readingSessionOptions: ReadingSessionOptions, val readerPublicationOptions: PdfReaderPublicationOptions = PdfReaderPublicationOptions(), val publicationOptions: PdfPublicationOptions = PdfPublicationOptions())

Used with ReadingSystemEngine.loadPdf to load PDF publications using a RandomAccessDataSource.

Link copied to clipboard

Format specific API for an PDF ReaderPublication.

Link copied to clipboard
class PointerEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.POINTER_ENGINE_EVENT, val type: EngineEventDataType, val button: Int, val buttons: Int, val clientX: Double, val clientY: Double, val ctrlKey: Boolean, val mediaResource: EngineEventMediaResourceData?, val metaKey: Boolean, val pageX: Double, val pageY: Double, val readerDocumentEventState: ReaderDocumentEventState, val relativeClientX: Double, val relativeClientY: Double, val relativeScreenX: Double, val relativeScreenY: Double, val screenX: Double, val screenY: Double, val target: EngineEventTargetData?, val userGenerated: Boolean, val isPrimary: Boolean, val pointerId: Int, val pointerType: String) : MouseEngineEventData

The EngineEvent type used for pointer events.

Link copied to clipboard
data class PointerTypeOptions(val mouse: Boolean = false, val pen: Boolean = false, val touch: Boolean = true)

Option to set which pointer types are allowed for PointerEvents in the ReaderView.

Link copied to clipboard
interface Publication

Describes the source publication that was loaded into a ReadingSystemEngine.

Link copied to clipboard
class PublicationMediaElementEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.PUBLICATION_MEDIA_ELEMENT_ENGINE_EVENT, val type: EngineEventDataType, val currentTimeMs: Int, val durationMs: Int, val mediaResource: EngineEventMediaResourceData, val target: EngineEventTargetData) : ReaderViewEngineEventData

Used for various publication media element related events.

Link copied to clipboard

Contains all metadata extracted from a publication.

Link copied to clipboard
data class PublicationStyleFontDefaults(val cursive: String? = null, val fallback: String, val fantasy: String? = null, val monospace: String? = null, val sansSerif: String? = null, val serif: String? = null)

NOTE: This interface is being simplified to be easier to use and will be released in an upcoming release.

Link copied to clipboard
data class PublicationStyleFontFace(val family: String, val fontStretch: String? = null, val fontStyle: String? = null, val fontWeight: String? = null, val mediaType: MediaType, val src: String? = null, val srcUrl: String? = null)
Link copied to clipboard
data class PublicationStyleFontSelector(val family: String, val selector: String)
Link copied to clipboard
data class PublicationStyleFontSet(val defaults: PublicationStyleFontDefaults, val fontFaces: List<PublicationStyleFontFace>, val selectors: List<PublicationStyleFontSelector> = emptyList())

NOTE: This interface is being simplified to be easier to use and will be released in an upcoming release.

Link copied to clipboard
data class PublicationStyleOptions(val defaultFontFamily: PublicationStyleOptionsDefaultFontFamily = PublicationStyleOptionsDefaultFontFamily.SERIF, val disableCssAnimations: Boolean = false, val fontSet: PublicationStyleFontSet? = null, val fontSizeScaleFactor: Double = 1.0, val lineHeightScaleFactor: Double = 1.0, val pageMargins: RectMargins? = null, val palette: PublicationStylePalette? = null, val textAlignment: PublicationStyleTextAlignmentOptions? = null)

Allows you to set styling options of the rendered publication.

Link copied to clipboard

Possible values for PublicationStyleOptions.defaultFontFamily

Link copied to clipboard
data class PublicationStylePalette(val accent: String, val backgroundDark: String, val backgroundLight: String, val foregroundDark: String, val foregroundLight: String)

Allows you to override the palette used for rendering the publication.

Link copied to clipboard
data class PublicationStyleTextAlignmentOptions(val preserved: List<TextAlignment>, val defaultAlignment: TextAlignment)

Options for overriding the text alignment in a publication.

Link copied to clipboard
interface ReaderDocument

A content document that has been processed for use by the Reading System.

Link copied to clipboard

How an event was acted upon by the content document before it was parsed into an EngineEvent.

Link copied to clipboard

A publication that has been processed for use by the Reading System.

Link copied to clipboard
data class ReaderPublicationClipboardOptions(val allowCopy: Boolean = true, val textToPrependOnCopy: String? = null, val textToAppendOnCopy: String? = null)

Options controlling how Clipboard actions behave in ReaderPublications

Link copied to clipboard

Contains the complete publication navigation as defined in the source publication. For example, in EPUB this equates to the NAV document or the NCX document.

Link copied to clipboard

Represents a collection of ReaderPublicationNavigationItemData in a tree structure. Note that some NavigationCollectionTypes such as PAGE_LIST are flat lists of ReaderPublicationNavigationItemData.

Link copied to clipboard
Link copied to clipboard
data class ReaderPublicationNavigationItemReference(val readerDocumentIndexInSpine: Int, val navigationItem: ReaderPublicationNavigationItem, val navigationCollection: ReaderPublicationNavigationCollection)

Describes a reference to an item in the publication navigation.

Link copied to clipboard
interface ReaderView
Link copied to clipboard

A ReaderViewAnnotation can either reference a range of publication content or a position (point) within publication content. ReaderViewAnnotations are rendered inside a ReaderViewAnnotationLayer, which in turn is rendered on top of publication content.

Link copied to clipboard

ReaderViewAnnotationLayers are used for creating and rendering ReaderViewAnnotations. Annotation layers are created using ReaderView.createAnnotationLayer and are rendered on top of publication content.

Link copied to clipboard
data class ReaderViewAnnotationLayerOptions(val layerClassName: String? = null, val layerStyle: Map<String, String>? = null, val annotationInputEngineEventsEnabled: Boolean = false, val zIndex: Int = 0)

Options related with the ReaderViewAnnotationLayer.

Link copied to clipboard
data class ReaderViewAnnotationOptions(val containerClassName: String? = null, val containerStyle: Map<String, String>? = null, val positionClassName: String? = null, val positionStyle: Map<String, String>? = null, val rangeClassName: String? = null, val rangeStyle: Map<String, String>? = null)

Options related with the presentation of ReaderViewAnnotations.

Link copied to clipboard
open class ReaderViewEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.READER_VIEW_ENGINE_EVENT, val type: EngineEventDataType) : EngineEventData

The data class representing an EngineEvent related to a ReaderView.

Link copied to clipboard
data class ReaderViewGestureOptions(val panZoom: ReaderViewPanZoomGestureOptions = ReaderViewPanZoomGestureOptions(), val swipeNavigation: ReaderViewSwipeNavigationGestureOptions = ReaderViewSwipeNavigationGestureOptions())

Options for gestures performed on the ReaderView.

Link copied to clipboard

The gesture types for user interactions with a ReaderView.

Link copied to clipboard
data class ReaderViewGotoOptions(val setReadingPositionToVisibleRangeStart: Boolean = false)

Options object used with ReaderView.goTo()

Link copied to clipboard
data class ReaderViewOptions(val defaultPageAspectRatio: Double = 0.66666666666, val defaultPageProgressionDirection: ReaderViewPageProgressionDirection = ReaderViewPageProgressionDirection.LTR, val defaultStartPageSpreadSlot: ReaderViewOptionsDefaultStartPageSpreadSlot = ReaderViewOptionsDefaultStartPageSpreadSlot.AUTO, val emitPointerMoveEventsOnHover: Boolean = false, val forcePageAspectRatio: Double? = null, val forcePageProgressionDirection: ReaderViewPageProgressionDirection? = null, val gestureOptions: ReaderViewGestureOptions = ReaderViewGestureOptions(), val pageProgressionTimelineOptions: PageProgressionTimelineOptions = PageProgressionTimelineOptions(), val publicationStyleOptions: PublicationStyleOptions = PublicationStyleOptions(), val refreshDelayMs: Int = 200, val rendererTransitionAnimationDurationMs: Int? = null, val rendererTransitionTimeoutMs: Int = 500, val transformManagerOptions: ReaderViewTransformManagerOptions = ReaderViewTransformManagerOptions())

Options for changing the behavior and appearance of a ReaderView.

Possible values for ReaderViewOptions.defaultStartPageSpreadSlot

Link copied to clipboard

The global direction in which the Publication content flows.

Link copied to clipboard
data class ReaderViewPanZoomGestureOptions(val allowSinglePointerPan: Boolean = true, val pinchZoomThresholdPx: Int = 32, val pointerTypes: PointerTypeOptions = PointerTypeOptions(), val removeTransformOnZoomOutGesture: Boolean = true)

Options used for configuring the panZoom gesture on a ReaderView. Part of IReaderViewOptions.gestureOptions

Link copied to clipboard
data class ReaderViewScrollStateData(val rendererClientHeight: Double, val scrollTop: Double, val scrollHeight: Double, val scrolling: Boolean)

Information about a renderer's current scroll position.

Link copied to clipboard
data class ReaderViewSwipeNavigationGestureOptions(val pointerDragThresholdPx: Int = 32, val pointerTypes: PointerTypeOptions = PointerTypeOptions())

Options for swipe navigation gestures, set by IReaderViewOptions.gestureOptions

Link copied to clipboard

Used for programmatically managing transformations of the ReaderView, such as scaling and translating. You can for example use this to zoom to a position when a user clicks on the ReaderView.

Link copied to clipboard
data class ReaderViewTransformManagerOptions(val maxPanOffsetHorizontal: Length? = null, val maxPanOffsetVertical: Length? = null, val maxScaleFactor: Double? = null, val removeTransformAnimationDurationMs: Int = 300, val removeTransformOnNavigation: Boolean = true)

Options for the ReaderViewTransformManager.

Link copied to clipboard
data class ReadingSessionOptions(val publicationToken: String? = null, val userToken: String)

This data is used to identify reading session using a combination of a user token and publication token. The values that should be used are dependent on your Product Commercial Agreement. This data should be anonymized in order to protect the user's privacy. This information will be sent to Colibrio License Server.

Link copied to clipboard

ReadingSystemEngine is the entry point to the Colibrio Reading System API. It is used for loading publications, accessing the ReaderView, creating SyncMediaPlayers and more.

Link copied to clipboard
sealed class Renderer

A Renderer is responsible for the presentation of the ReaderPublication. For example, the Renderer.Stack presents the publication as a series of pages stacked on top of each other like a deck of cards.

Link copied to clipboard
class RendererScrollEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.RENDERER_SCROLL_ENGINE_EVENT, val type: EngineEventDataType, val scrollDistance: Double, val scrollTop: Double, val userGenerated: Boolean) : ReaderViewEngineEventData

Event data object used when a scroll action has ended in a scrolling renderer such as the SingleDocumentScrollRenderer.

Link copied to clipboard
data class SearchResultItem(val locator: SimpleLocatorData, val matchingText: String, val readerDocumentIndexInSpine: Int, val textAfter: String, val textBefore: String)

Represents a search result item containing a search match.

Link copied to clipboard
class SelectionChangedEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SELECTION_CHANGED_ENGINE_EVENT, val type: EngineEventDataType, val isRange: Boolean, val locator: SimpleLocatorData?, val readerDocumentIndexInSpine: Int?, val selectionText: String?) : ReaderViewEngineEventData

EngineEvent type used for "selectionChanged" events.

class SwipeNavigationGestureProgressEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SWIPE_NAVIGATION_GESTURE_PROGRESS_ENGINE_EVENT, val type: EngineEventDataType, val animationProgress: Double, val deltaX: Double, val deltaY: Double, val pendingNavigationAction: NavigationAction, val relativeDeltaClientX: Double, val relativeDeltaClientY: Double, val relativeDeltaScreenX: Double, val relativeDeltaScreenY: Double) : ReaderViewEngineEventData

Engine event type used for "swipeNavigationGestureProgress" events.

Link copied to clipboard
class SyncMediaAudioRef(val endMs: Int?, val objectIndex: Int, val startMs: Int) : SyncMediaObjectRef

Describes a reference to a range within an audio SyncMediaObject.

Link copied to clipboard
open class SyncMediaEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_ENGINE_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData) : EngineEventData
class SyncMediaEngineEventTargetXmlElementNodeData(val nodeType: EngineEventTargetNodeType = EngineEventTargetNodeType.SYNC_MEDIA_XML_ELEMENT, val parent: SyncMediaEngineEventTargetXmlElementNodeData?, val attributes: List<AttributeData>, val namespaceURI: String?, val nodeName: String, val prefix: String?, val endPosition: SyncMediaTimelinePositionData, val startPosition: SyncMediaTimelinePositionData) : EngineEventTargetXmlElementNodeData

Contains information related to an ISyncMediaEngineEventTarget.

Link copied to clipboard
class SyncMediaErrorEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_ERROR_ENGINE_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData, val error: String, val errorMessage: String?, val errorType: SyncMediaPlayerErrorType, val paused: Boolean, val segmentIndex: Int) : SyncMediaEngineEventData

Event used when a SyncMediaPlayer encounters an error.

Link copied to clipboard

The SyncMedia formats supported by the framework.

data class SyncMediaManagedReaderViewSynchronizationOptions(val alwaysSeekToSegmentStart: Boolean = false, val enabled: Boolean = true, val minimumTimeToDisplayPagesWithSyncMedia: Int = 0, val navigateOnVisibleRangeEndReached: Boolean = true, val skipPagesWithoutSyncMedia: Boolean = false, val timeToDisplayPagesWithoutSyncMedia: Int = 2000)

Options specifying the behavior for managed synchronization between a SyncMediaPlayer and a ReaderView.

Link copied to clipboard
data class SyncMediaObjectData(val durationMs: Int?, val resourceMetadata: ResourceMetadata)

Represents a media resource in a SyncMediaTimeline.

Link copied to clipboard

Base type used for referencing media objects within a SyncMediaSegment.

Link copied to clipboard

Types used for determining the correct subtype of ISyncMediaObjectRef.

Link copied to clipboard
Link copied to clipboard
data class SyncMediaPlaybackRangeOptions(val alwaysInitiallySeekToRangeStart: Boolean = true, val pauseOnRangeRemoved: Boolean = false, val removeRangeOnEndReached: Boolean = true, val seekBehaviour: SyncMediaRangeSeekBehavior = SyncMediaRangeSeekBehavior.ALWAYS_REMOVE_RANGE)

Options object used with SyncMediaPlayer.setPlaybackRange.

Link copied to clipboard
interface SyncMediaPlayer

Used for playing synchronized media such as EPUB Media Overlays or TTS (Text-To-Speech).

Link copied to clipboard
data class SyncMediaPlayerInitOptions(val addDefaultMediaObjectRenderers: Boolean = true, val preloadAheadMs: Int = 20000, val preloadBehindMs: Int = 5000)

Used when creating a new SyncMediaPlayer using ReadingSystemEngine.createSyncMediaPlayer(). These options cannot be changed after the SyncMediaPlayer has been created.

Link copied to clipboard

Describes the position of the SyncMediaPlayer relative to the visible content in a ReaderView.

Link copied to clipboard
class SyncMediaRangeEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_RANGE_ENGINE_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData, val playbackRange: SyncMediaPlaybackRangeData, val reason: SyncMediaRangePlaybackRemoveReason? = null) : SyncMediaEngineEventData

Used for events related to range playback in the SyncMediaPlayer.

Link copied to clipboard

Describes why a playback range was removed from a ISyncMediaPlayer.

Link copied to clipboard

Used with SyncMediaPlayer.attemptReaderViewSynchronization()

data class SyncMediaReaderViewSynchronizationStateData(val mediaPlayerPositionRelativeToVisibleRange: SyncMediaPositionRelativeToVisibleRange, val nextTimelineRange: SyncMediaTimelineRangeData?, val previousTimelineRange: SyncMediaTimelineRangeData?, val resolvedMediaPlayerPosition: SyncMediaResolvedLocatorData, val resolvedReaderViewReadingPosition: SyncMediaResolvedLocatorData, val triggeredBy: SyncMediaSyncEventTrigger, val visibleTimelineRange: SyncMediaTimelineRangeData)

Describes the synchronization state between a SyncMediaPlayer and a ReaderView.

The synchronization behavior for the SyncMediaPlayer when it is attached to a ReaderView.

Link copied to clipboard
data class SyncMediaResolvedLocatorData(val locator: SimpleLocatorData, val readerDocumentIndexInSpine: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData)

Contains a locator and its corresponding SyncMediaTimelinePosition.

Link copied to clipboard
class SyncMediaSegmentActiveEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_SEGMENT_ACTIVE_ENGINE_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData, val segmentIndex: Int, val targets: List<SyncMediaSegmentTargetData>) : SyncMediaEngineEventData
Link copied to clipboard
data class SyncMediaSegmentData(val approximateDurationMs: Int, val durationType: SyncMediaSegmentDurationType, val readerDocumentIndexInSpine: Int, val refs: List<SyncMediaObjectRef>)

Represents a segment within a SyncMediaTimeline, containing information about all SyncMediaObjectRefs that will be played in parallel.

class SyncMediaSegmentDurationChangedEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_SEGMENT_DURATION_CHANGED_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData, val newDurationMs: Int, val oldDurationMs: Int, val segmentIndex: Int) : SyncMediaEngineEventData

This event fires after the duration of a SyncMediaTimelineSegment has been updated. This can happen when the SyncMediaPlayer has received additional information about a segment'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
class SyncMediaSegmentTargetData(val frameworkComponent: EngineEventTargetFrameworkComponent, val locator: SimpleLocatorData?, val mediaType: String, val nodeData: SyncMediaEngineEventTargetXmlElementNodeData?, val objectType: EngineEventTargetObjectType = EngineEventTargetObjectType.SYNC_MEDIA_SEGMENT_TARGET, val readerDocumentIndexInSpine: Int?) : EngineEventTargetData

A target related with a SyncMediaSegment, such as the DOM node being spoken by TTS, or active element when playing media overlays.

Link copied to clipboard

The type of action that triggered the syncMediaReaderViewSynchronizationStateChanged event.

Link copied to clipboard

A SyncMediaTimeline describes arbitrary media (such as audio or video) and how to synchronize them with the publication content.

Link copied to clipboard
data class SyncMediaTimelinePositionData(val segmentIndex: Int, val offsetWithinSegmentMs: Int)

Describes a position within a SyncMediaTimeline instance.

Link copied to clipboard

Describes a range within a SyncMediaTimeline.

Link copied to clipboard

Type used for TTS that is based from text extracted from ContentBlocks.

Link copied to clipboard
data class SyncMediaTtsContentBlockRefSource(val contentBlockId: Int, val endOffset: Int, val srcMap: String, val startOffset: Int, val ttsOffset: Int)

Describes how the TTS text was generated from a ContentBlock.

Link copied to clipboard
class SyncMediaWaitingEngineEventData(val objectType: EngineEventDataObjectType = EngineEventDataObjectType.SYNC_MEDIA_WAITING_ENGINE_EVENT, val type: EngineEventDataType, val approximateElapsedTimeMs: Int, val syncMediaTimelinePosition: SyncMediaTimelinePositionData, val waitingForMediaObjectRenderers: Boolean, val waitingForReaderViewSynchronization: Boolean) : SyncMediaEngineEventData
Link copied to clipboard

Describes all supported text alignments in publication content.

Link copied to clipboard
data class TextSearchQueryOptions(val ignoreCase: Boolean = true, val searchResultOptions: TextSearchResultOptions = TextSearchResultOptions(), val whitespaceMode: TextSearchQueryWhitespaceMode = TextSearchQueryWhitespaceMode.COLLAPSE)

Options object used with ReaderDocumentSearch.createTextQuery.

Link copied to clipboard

Describes how to treat whitespace in the source content when using IReaderDocumentSearch.createTextQuery.

Link copied to clipboard

Used with ITextSearchResultOptions, describing how the text in SearchResultItem.textBefore and the SearchResultItem.textAfter is computed.

Link copied to clipboard
data class TextSearchResultOptions(val expandMode: TextSearchResultExpandMode = TextSearchResultExpandMode.EXPAND_TO_WORD_BOUNDARY, val numberOfCharactersAfter: Int = 40, val numberOfCharactersBefore: Int = 40)

Options object controlling the data available in search result items

Link copied to clipboard
data class TransformAnimationOptions(val durationMs: Int? = null, val easing: String = "cubic-bezier(0.4, 0.0, 0.2, 1)")

Options controlling how to animate the ReaderView when applying a new active transform using the IReaderViewTransformManager.

Link copied to clipboard
data class TransformData(val scale: Double, val x: Double, val y: Double, val animating: Boolean = false, val userGestureActive: Boolean = false)

Describes a 2D transform.

Link copied to clipboard

A collection of common easing functions when performing animations. Can be used with the various transform methods in IReaderViewTransformManager.

Link copied to clipboard
data class TransformRectZoomOptions(val animationOptions: TransformAnimationOptions? = null, val maxScaleFactor: Double? = null)

Options related to IReaderViewTransformManager.zoomToClientRect().

Link copied to clipboard
class TtsSyncMediaTimelineConfiguration(val ttsSynthesizer: TtsSynthesizer, val highlightLayer: ReaderViewAnnotationLayer? = null, val rendererOptions: SyncMediaTtsContentBlockRendererOptions = SyncMediaTtsContentBlockRendererOptions(), val contentTransformOptions: SyncMediaTtsTimelineContentTransformationOptions = SyncMediaTtsTimelineContentTransformationOptions())

Configuration object used when creating TTS SyncMediaTimeline.

Link copied to clipboard
interface TtsSynthesizer

Base interface used for implementing TTS speech synthesizers. A ITtsSynthesizer maintains a queue of ITtsUtteranceData and manages its playback. A newly created TtsSynthesizer is in paused state, has its volume set to 1.0 and playback rate set to 1.0.

Link copied to clipboard

Used by ITtsSynthesizer implementations to report its playback state.

Link copied to clipboard
data class TtsUtteranceData(val charOffset: Int, val id: Int, val nodeData: EngineEventTargetXmlElementNodeData?, val text: LocalizableString)
Link copied to clipboard
data class VisibleContentRectData(val clientRect: Rect, val locator: SimpleLocatorData, val nodeData: EngineEventTargetNodeData? = null, val type: VisibleContentRectType)

Contains the position, dimensions, and locator of a line or replaced element.

Link copied to clipboard
data class VisibleContentRectsOptions(val includeNodeData: Boolean = false)

Options used with ReaderView.fetchRectsForVisibleContent().

Link copied to clipboard
data class VisibleContentRectsResultData(val boundingClientRect: Rect?, val locator: SimpleLocatorData, val rects: List<VisibleContentRectData>)

A serializable result object returned from IReaderView.fetchRectsForVisibleContent().

Link copied to clipboard

Describes what type of content a IVisibleContentRect represents.

Link copied to clipboard
interface VisiblePage

A page fully visible or partially visible in the ReaderView.

Link copied to clipboard
Link copied to clipboard

Indicates the severity of a WebView console message.

Functions

Link copied to clipboard
fun PublicationStyleFontFace.Companion.fromAsset(family: String, fontStretch: String? = null, fontStyle: String? = null, fontWeight: String? = null, mediaType: MediaType, assetPath: String): PublicationStyleFontFace

Creates a PublicationStyleFontFace using an asset font file.