SyncMediaTimelineData

data class SyncMediaTimelineData(val approximateDurationMs: Int, val mediaObjectRefTypes: List<SyncMediaObjectRefType>, val mediaObjects: List<SyncMediaObjectData>, val publicationHashSignature: String, val readerDocumentIndexes: List<Int>, val readerPublicationDefaultLocatorUrl: String, val segments: List<SyncMediaSegmentData>, val syncMediaFormat: SyncMediaFormat)

A SyncMediaTimeline is created by calling any of the createSyncMediaTimeline() methods on a ReaderPublication. Each publication format supports different sync media formats. EPUB supports Media Overlays as well as content block based TTS, whereas PDF only supports content block based TTS. For example: EpubReaderPublication.createMediaOverlaySyncMediaTimeline() or EpubReaderPublication.createTtsSyncMediaTimeline()

The SyncMediaTimeline contains a list of segments that should be played in order. Each segment contains references to media objects that should be played in parallel.

The SyncMediaTimeline also contains methods for mapping between SyncMediaTimelinePositions and ContentLocations. This feature allows the reading system to synchronize SyncMedia playback with visible publication content such as automatic page turning and highlighting of narrated content.

Constructors

Link copied to clipboard
fun SyncMediaTimelineData(approximateDurationMs: Int, mediaObjectRefTypes: List<SyncMediaObjectRefType>, mediaObjects: List<SyncMediaObjectData>, publicationHashSignature: String, readerDocumentIndexes: List<Int>, readerPublicationDefaultLocatorUrl: String, segments: List<SyncMediaSegmentData>, syncMediaFormat: SyncMediaFormat)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

It is possible that this duration is updated during runtime as media is loaded and more information is available. If that happens, a 'syncMediaSegmentDurationChanged' event is fired.

Link copied to clipboard

List of all media object ref types that MAY be present in this timeline.

Link copied to clipboard

Media objects used by this timeline.

Link copied to clipboard

The hash signature of the publication this timeline was created from.

Link copied to clipboard

The list of the reader document indexes that was used for creating this timeline.

Link copied to clipboard

The default Locator URL of the ReaderPublication this timeline was created from.

Link copied to clipboard

all segments in the timeline defining the playback order of media objects.

Link copied to clipboard

The source sync media format.