Options
All
  • Public
  • Public/Protected
  • All
Menu

Used internally by SyncMediaPlayer to handle media playback of SyncMediaObjects within a SyncMediaTimeline.

Hierarchy

  • ISyncMediaObjectRendererRuntime

Index

Methods

Optional bindRenderableDocumentPage

  • Adds a binding to a renderable page, allowing the renderer to perform actions on it. This is for example used to handle the "active element" feature in EPUB Media overlay.

    The caller must use unbindRenderablePage when the page should no longer be managed by the renderer.

    Parameters

    Returns void

clearRangeEndPosition

  • clearRangeEndPosition(): void
  • Clears any "range end" position previously set by playUntilRangeEnd().

    Returns void

getSegmentTargets

  • Get the targets for a segment. For example, this could be the elements that are highlighted in a media overlay, or the currently spoken TTS utterance.

    Parameters

    • segmentIndex: number

    Returns ISyncMediaSegmentTarget[]

Optional onSyncMediaPlayerPauseStateChanged

  • onSyncMediaPlayerPauseStateChanged(paused: boolean): void
  • Called when the play/pause state changes for the SyncMediaPlayer. Note that this MUST NOT be used for resuming/pausing playback of temporal content in this renderer as SyncMediaObjectRendererRuntime instances might not be ready.

    Parameters

    • paused: boolean

    Returns void

pause

  • pause(): void
  • Pause this renderer.

    Returns void

play

  • play(): void
  • Starts playing or resuming.

    If the playback cannot be resumed, because of a NOT_ALLOWED error for example, the implementation must call SyncMediaObjectRendererContext.setRuntimePaused().

    Returns void

playUntilRangeEnd

  • Tells the runtime to play from its current position until it reaches the endPosition();

    See the comment on ISyncMediaObjectRendererContext.onRangeEndReached() for implementation requirements.

    Parameters

    Returns void

seekToTimelinePosition

  • Seeks to a new position in the timeline. The implementation MUST internally pause and set its ready state to false (i.e. waiting) before performing the seek. The implementation MUST call context.onRuntimeReady() when seeking has finished and it is ready to resume playback.

    Parameters

    Returns void

setActiveSegmentIndex

  • setActiveSegmentIndex(segmentIndex: number): void
  • Called during playback when the active segment pointer advances to the next segment in the list of segments. This method is only called during playback, and when segmentIndex increments by 1.

    Parameters

    • segmentIndex: number

    Returns void

setMuted

  • setMuted(muted: boolean): void
  • Sets the muted state of the component.

    Parameters

    • muted: boolean

    Returns void

setPlaybackRate

  • setPlaybackRate(playbackRate: number): void
  • Sets the playback rate of the component.

    Parameters

    • playbackRate: number

      A number where 1.0 is "normal speed," values lower than 1.0 make the media play slower than normal, higher values make it play faster. If the number is outside of a useful range, the browser may mute it. (for example, Gecko mutes the sound outside the range 0.25 to 5.0). Must be positive.

    Returns void

setVolume

  • setVolume(volume: number): void
  • Sets the volume of the component. Will not unmute if setMuted(true) has been called.

    Parameters

    • volume: number

      A number between 0.0 and 1.0.

    Returns void

Optional unbindRenderableDocumentPage

  • Unbinds a renderable page previously bound with bindRenderablePage()

    Parameters

    Returns void

willCallPlaybackPositionUpdated

  • willCallPlaybackPositionUpdated(segmentIndex: number): boolean
  • If this renderer runtime will call context.onPlaybackPositionUpdated() for the specified segment index.

    Parameters

    • segmentIndex: number

    Returns boolean

Generated using TypeDoc