Options
All
  • Public
  • Public/Protected
  • All
Menu

Synchronizes a local HTML Media Element with a group of remote HTML Media Elements.

remarks

All of an apps transport control commands should be routed through the synchronizer. If the app is not currently joined to the group media session, the commands will be applied directly to the local player. When the group session is joined the commands will be broadcast to the group in addition to being applied to the local player.

Hierarchy

  • EventEmitter
    • MediaPlayerSynchronizer

Index

Constructors

Accessors

  • get viewOnly(): boolean
  • set viewOnly(value: boolean): void
  • If true the client is in a view only mode.

    remarks

    Toggling this value to true results in mediaSession.coordinator.canPlayPause, mediaSession.coordinator.canSeek, mediaSession.coordinator.canSetTrack, and mediaSession.coordinator.canSetTrackData all being set to false. For more fine grained control over the local clients policies, call the mediaSession.coordinator directly.

    Returns boolean

  • If true the client is in a view only mode.

    remarks

    Toggling this value to true results in mediaSession.coordinator.canPlayPause, mediaSession.coordinator.canSeek, mediaSession.coordinator.canSetTrack, and mediaSession.coordinator.canSetTrackData all being set to false. For more fine grained control over the local clients policies, call the mediaSession.coordinator directly.

    Parameters

    • value: boolean

    Returns void

Methods

  • beginSeek(): void
  • Begin a local seek operation.

    remarks

    UI can call this when a user grabs a timeline scrubber and starts scrubbing the video to a new playback position. The synchronizer will being a new suspension which temporarily disconnects the client for the rest of the group for synchronization purposes. Calling endSeek() will end the suspension and seek the group to the users final seek position.

    Returns void

  • end(): void
  • endSeek(seekTo: number): void
  • pause(): void
  • play(): void
  • seekTo(time: number): void
  • Tells the group to seek the current video to a new playback position.

    remarks

    For proper operation apps should avoid calling mediaSession.coordinator.seekTo() directly and instead use the synchronizers seekTo() method.

    Parameters

    • time: number

    Returns void

  • setTrackData(data: null | object): void
  • Updates the current tracks data object.

    remarks

    For proper operation apps should avoid calling mediaSession.coordinator.setTrackData() directly and instead use the synchronizers setTrackData() method.

    Parameters

    • data: null | object

    Returns void

Generated using TypeDoc