SyncMediaSegmentTargetData

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.

EPUB Media Overlays reports two targets. One with type "application/smil+xml" containing the "par" node backing this segment (including references to parent "seq" nodes). One with type "application/xhtml+xml" containing the html node targeted by the "par" node.

Each node contains a start and end SyncMediaTimelinePosition. If you for example want to allow user's to skip content such as "table" elements, you can search for nodes with nodeName == "table" and skip to that node's endPosition.

Constructors

Link copied to clipboard
fun SyncMediaSegmentTargetData(frameworkComponent: EngineEventTargetFrameworkComponent, locator: SimpleLocatorData?, mediaType: String, nodeData: SyncMediaEngineEventTargetXmlElementNodeData?, objectType: EngineEventTargetObjectType = EngineEventTargetObjectType.SYNC_MEDIA_SEGMENT_TARGET, readerDocumentIndexInSpine: Int?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun serialize(generator: JsonGenerator)

Properties

Link copied to clipboard

Describes the framework component that was the target of the event.

Link copied to clipboard

A locator that points to the publication content related with the event.

Link copied to clipboard

Describes the media type of the document related with the event, and thereby what data types to expect in nodeData

Link copied to clipboard

A JSON compatible data structure representing the underlying node that was the target of the event, like for example a HTML node in a HTML content-document.

Link copied to clipboard

The type of EngineEventTarget object this JSON structure represents.

Link copied to clipboard

The index of the reader document that was the target of the event if any.