Create the default set of media object renderers required for playing all content types in this timeline.
Find the ContentLocation that most closely corresponds to the timeline position.
Find the timeline position that most closely corresponds to a ContentLocation or Locator.
Find the timeline range that most closely corresponds to a range ContentLocation or Locator.
If the passed locator is not a range, the resulting range will have end = start.
Gets the total duration of the timeline in milliseconds.
It is possible that the duration is updated during runtime as media is loaded and more information is available.
If this happens, a syncMediaSegmentDurationChanged
engine event will fire after the duration has been updated.
Get the approximate offsetMs into the timeline from an ISyncMediaTimelinePosition.
Get a list of all SyncMediaObjectRef types that MAY be present in this timeline.
Media objects used by this timeline.
Get the ReaderPublication this timeline was created from.
Get the ResourceProvider instance that is used for fetching media object resources.
Get all segments in the timeline defining the playback order of media objects.
Get the source sync media format.
Get the timeline position that most closely matches an offset into the timeline. If the offsetMs is negative, the position at the start of the timeline will be returned and if the offset is larger than the duration of the timeline, the position at the end of the timeline will be returned.
Milliseconds into the timeline.
Get this instance as a plain JSON serializable object.
Generated using TypeDoc
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()
orEpubReaderPublication.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.