Options
All
  • Public
  • Public/Protected
  • All
Menu

Used internally by the framework. Used by ISyncMediaObjectRendererRuntime to communicate with ISyncMediaPlayer.

Hierarchy

  • ISyncMediaObjectRendererContext

Index

Methods

onActiveSegmentFinished

  • onActiveSegmentFinished(segmentIndex: number): void
  • Called by the renderer when the currently active segment has finished playing.

    It should also be called immediately after setActiveSegmentIndex() has been called if playback of the active segment is not supported by the renderer.

    Must be called with the last segment index passed to SyncMediaObjectRendererRuntime.setActiveSegmentIndex() or seekToTimelinePosition().

    If the SyncMediaObjectRendererRuntime implementation calls this method with a segment index that has not yet been set active, the call is ignored.

    Parameters

    • segmentIndex: number

    Returns void

onPlayRequest

  • onPlayRequest(): void
  • Called by the SyncMediaObjectRendererRuntime if it wants to resume playback, for example because of a user interaction.

    Returns void

onPlaybackPositionUpdated

  • onPlaybackPositionUpdated(segmentIndex: number, newOffsetWithinSegmentMs: number): void
  • MAY be called continuously by the renderer indicating its current position on the timeline. The SyncMediaObjectRendererRuntime MAY report segmentIndex and offset further ahead than the current active segment during continuous playback.

    Parameters

    • segmentIndex: number
    • newOffsetWithinSegmentMs: number

    Returns void

onRangeEndReached

  • onRangeEndReached(rangeId: number): void
  • Called by the renderer when it has reached the end of a range set by playUntilRangeEnd(). The renderer MUST internally pause at the exact position of the endPosition, but MUST NOT call onRuntimePaused().

    Parameters

    • rangeId: number

    Returns void

onRuntimePaused

  • onRuntimePaused(): void
  • Called by the SyncMediaObjectRendererRuntime when its pause state changes due to a user interaction causing the playback to stop. This method SHOULD NOT be called if the renderer runtime pauses due to an error, or if the pause() method is called.

    Returns void

onRuntimeReady

  • onRuntimeReady(): void
  • Called by the SyncMediaObjectRendererRuntime when its ready state changes from waiting to ready. This means that it has enough data to perform continuous playback.

    The SyncMediaObjectRendererRuntime MUST wait for a call to play() before resuming playback.

    Returns void

onRuntimeWaiting

  • onRuntimeWaiting(): void
  • Called by the SyncMediaObjectRendererRuntime when its ready state changes from ready to waiting. This means that it hasn't enough data to perform continuous playback.

    The SyncMediaObjectRendererRuntime MUST internally pause its playback before calling this method.

    Returns void

onSegmentDurationChanged

  • onSegmentDurationChanged(segmentIndex: number, newDurationMs: number): void
  • Called by the renderer when it has received additional information about a segment's duration (such as after loading the media) and it does not match with the approximated value.

    Parameters

    • segmentIndex: number
    • newDurationMs: number

    Returns void

onSegmentError

  • Called when a segment error occurs. If the renderer is unable to play the segment due to the error, the renderer should pause itself and set the paused flag to true. The renderer SHOULD NOT call onRuntimePaused().

    Parameters

    • segmentIndex: number

      The segment index that failed to load/play

    • errorType: SyncMediaPlayerErrorType

      The type of error that occurred.

    • error: unknown

      An error object further describing the error.

    • paused: boolean

      If the error caused the renderer runtime to become paused.

    Returns void

Generated using TypeDoc