Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

Index

Properties

frameworkComponent

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

locator

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

mediaType

mediaType: string

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

This can be for example:

  • MediaType.APPLICATION_SMIL ("application/smil+xml") if node is a par node within a SMIL document.
  • MediaType.APPLICATION_XHTML ("application/xhtml+xml") if node is a XHTML node.
  • MediaType.APPLICATION_SVG ("image/svg") if node is a SVG node.

Some events will not generate any nodeData. In those cases, mediaType will be the empty string ''

nodeData

The node data describing the segment target element and its ancestors. The contents depends on the value of the mediaType property.

objectType

The type of EngineEventTarget object this JSON structure represents.

default

SYNC_MEDIA_SEGMENT_TARGET

readerDocumentIndexInSpine

readerDocumentIndexInSpine: number

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

int

Generated using TypeDoc