Sync Media Timeline
A SyncMediaTimeline describes arbitrary media (such as audio or video) and how to synchronize them with the publication content.
The timeline contains a list of segments defining the playback order of mediaObjects.
A SyncMediaTimeline is played using a SyncMediaPlayer.
SyncMediaTimeline instances are created from ReaderPublication instances. For example: EpubReaderPublication.createMediaOverlaySyncMediaTimeline
Properties
Returns the approximate total duration of the timeline in milliseconds. This value may be updated during playback as media is loaded and more information becomes available. When updated, OnSyncMediaPlayerEventListener.onSegmentDurationChanged will be called.
The media objects, such as audio and video resources, used by this timeline. Media objects are referenced by SyncMediaSegments
The base URL of the ReaderPublication this timeline was created from. This value will match ReaderPublication.defaultLocatorUrl.
All segments in the timeline defining the playback order of mediaObjects.
The source sync media format this timeline was built from.
Functions
Find the locator that most closely corresponds to the timeline position.
Find the SyncMediaTimelinePositionData that most closely corresponds to a locator.
Find the SyncMediaTimelinePositionData that most closely corresponds to a navigationItem.
Find the timeline range that most closely corresponds to a range Locator.
Get the approximate offset into the timeline in milliseconds from a timeline position object.
Get the timeline position that most closely matches an offset into the timeline. If the offset is negative, the position at the start of the timeline will be returned. If the offset is larger than the duration of the timeline, the position at the end of the timeline will be returned.