Options
All
  • Public
  • Public/Protected
  • All
Menu

The LiveMediaSessionCoordinator tracks the playback & position state of all other clients being synchronized with. It is responsible for keeping the local media player in sync with the group.

Hierarchy

  • EventEmitter
    • LiveMediaSessionCoordinator

Index

Properties

canPlayPause: boolean = true

Controls whether or not the local client is allowed to instruct the group to play or pause.

remarks

This flag largely meant to influence decisions made by the coordinator and can be used by the UI to determine what controls should be shown to the user. It does not provide any security in itself.

If your app is running in a semi-trusted environment where only some clients are allowed to play/pause media, you should use "role based verification" to enforce those policies.

canSeek: boolean = true

Controls whether or not the local client is allowed to seek the group to a new playback position.

remarks

This flag largely meant to influence decisions made by the coordinator and can be used by the UI to determine what controls should be shown to the user. It does not provide any security in itself.

If your app is running in a semi-trusted environment where only some clients are allowed to change the playback position, you should use "role based verification" to enforce those policies.

canSetTrack: boolean = true

Controls whether or not the local client is allowed to change tracks.

remarks

This flag largely meant to influence decisions made by the coordinator and can be used by the UI to determine what controls should be shown to the user. It does not provide any security in itself.

If your app is running in a semi-trusted environment where only some clients are allowed to change tracks, you should use "role based verification" to enforce those policies.

canSetTrackData: boolean = true

Controls whether or not the local client is allowed to change the tracks custom data object.

remarks

This flag largely meant to influence decisions made by the coordinator and can be used by the UI to determine what controls should be shown to the user. It does not provide any security in itself.

If your app is running in a semi-trusted environment where only some clients are allowed to change the tracks data object, you should use "role based verification" to enforce those policies.

Accessors

  • get isSuspended(): boolean
  • get maxPlaybackDrift(): number
  • set maxPlaybackDrift(value: number): void
  • get positionUpdateInterval(): number
  • set positionUpdateInterval(value: number): void

Methods

  • Begins a new local suspension.

    remarks

    Suspension temporarily suspend the clients local synchronization with the group. This can be useful for displaying ads to users or temporarily disconnecting from the session while the user seeks the video using a timeline scrubber.

    Multiple simultaneous suspensions are allowed and when the last suspension ends the local client will be immediately re-synchronized with the group.

    A "Dynamic Wait Point" can be specified when beginSuspension() is called and the wait point will be broadcast to all other clients in the group. Those clients will then automatically enter a suspension state once they reach the positions specified by the wait point. Clients that are passed the wait point will immediately suspend.

    Any wait point based suspension (dynamic or static) will result in all clients remaining in a suspension state until the list client ends their suspension. This behavior can be conditionally bypassed by settings the wait points maxClients value.

    Throws an exception if the session/coordinator hasn't been initialized.

    Parameters

    • Optional waitPoint: CoordinationWaitPoint

      Optional. Dynamic wait point to broadcast to all of the clients.

    Returns MediaSessionCoordinatorSuspension

    The suspension object. Call end() on the returned suspension to end the suspension.

  • createChildren(acceptTransportChangesFrom?: UserMeetingRole[]): Promise<void>
  • pause(): void
  • play(): void
  • seekTo(time: number): void
  • Instructs the group to seek to a new position within the current track.

    remarks

    Throws an exception if the session/coordinator hasn't been initialized, no track has been loaded, or canSeek is false.

    Parameters

    • time: number

      Playback position in seconds to seek to.

    Returns void

  • Instructs the group to load a new track.

    remarks

    Throws an exception if the session/coordinator hasn't been initialized or canSetTrack is false.

    Parameters

    • metadata: null | ExtendedMediaMetadata

      The track to load or null to indicate that the end of the track is reached.

    • Optional waitPoints: CoordinationWaitPoint[]

      Optional. List of static wait points to configure for the track. Dynamic wait points can be added via the beginSuspension() call.

    Returns void

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

    remarks

    The track data object can be used by applications to synchronize things like pitch, roll, and yaw of a 360 video. This data object will be reset to null anytime the track changes.

    Throws an exception if the session/coordinator hasn't been initialized or canSetTrackData is false.

    Parameters

    • data: null | object

      New data object to sync with the group. This value will be synchronized using a last writer wins strategy.

    Returns void

Generated using TypeDoc