The FFCRemoteTrack class represents a remote media track in the FlipFlopCloud SDK. It extends the FFCTrack class and provides additional functionality specific to remote tracks.

Type Parameters

  • TrackKind extends Kind = Kind

    The type of the track, which defaults to FFCTrack.Kind.

Hierarchy (View Summary)

Implements

Accessors

  • get attachedElements(): HTMLMediaElement[]

    Gets the HTML media elements attached to the track.

    Returns HTMLMediaElement[]

    An array of HTMLMediaElement instances.

  • get currentBitrate(): number

    Gets the current bitrate of the track.

    Returns number

    The current bitrate in bits per second.

  • get isLocal(): boolean

    Indicates whether the track is local.

    Returns boolean

    false because this is a remote track.

  • get isMuted(): boolean

    Checks if the track is muted.

    Returns boolean

    true if the track is muted, otherwise false.

  • get kind(): TrackKind

    Gets the kind of the track (e.g., audio, video).

    Returns TrackKind

    The track kind as TrackKind.

  • get mediaStreamTrack(): MediaStreamTrack

    Gets the MediaStreamTrack associated with the track.

    Returns MediaStreamTrack

    The MediaStreamTrack instance.

  • get sid(): undefined | string

    Gets the streamd id (SID) of the track.

    Returns undefined | string

    The track SID, or undefined if not set.

  • get source(): Source

    Gets the source of the track (e.g., camera, microphone).

    Returns Source

    The track source as FFCTrack.Source.

  • get streamState(): StreamState

    Gets the stream state of the track (e.g., active, paused).

    Returns StreamState

    The stream state as FFCTrack.StreamState.

Methods

  • Creates a new HTMLAudioElement or HTMLVideoElement, attaches to it, and returns it.

    Returns HTMLMediaElement

    The attached HTMLMediaElement.

  • Attaches track to an existing HTMLAudioElement or HTMLVideoElement

    Parameters

    • element: HTMLMediaElement

      (Optional) The HTMLMediaElement to attach the track to.

    Returns HTMLMediaElement

    The attached HTMLMediaElement.

  • Detaches from all attached elements

    Returns HTMLMediaElement[]

    The detached HTMLMediaElement or an array of detached elements.

  • Detach from a single element.

    Parameters

    • element: HTMLMediaElement

      (Optional) The HTMLMediaElement to detach the track from.

    Returns HTMLMediaElement

    The detached HTMLMediaElement or an array of detached elements.

  • Gets the current playout delay for the remote track.

    Returns number

    The playout delay in seconds.

  • Retrieves the RTC stats report for the remote track.

    Returns Promise<undefined | RTCStatsReport>

    A promise that resolves to an RTCStatsReport, or undefined if not available.

  • Registers a time synchronization update for the remote track.

    Returns void

  • Sets the playout delay for the remote track.

    Parameters

    • delayInSeconds: number

      The delay in seconds to set for playout.

    Returns void