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

Hierarchy (View Summary)

Implements

  • IFFCRemoteAudioTrack

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.

  • 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.

  • Gets the current volume level of the audio track.

    Returns number

    The volume level as a number (0.0 to 1.0).

  • Sets the audio context for the audio track.

    Parameters

    • audioContext: undefined | AudioContext

      The AudioContext instance to set, or undefined to clear it.

    Returns void

  • Sets the playout delay for the remote track.

    Parameters

    • delayInSeconds: number

      The delay in seconds to set for playout.

    Returns void

  • Sets the sink device for the audio track.

    Parameters

    • deviceId: string

      The ID of the audio output device to use.

    Returns Promise<void>

    A promise that resolves when the sink device is set.

  • Sets the volume for the audio track.

    Parameters

    • volume: number

      The volume level to set (0.0 to 1.0).

    Returns void

  • Sets the Web Audio API plugins for the audio track.

    Parameters

    • nodes: AudioNode[]

      An array of AudioNode instances to set as plugins.

    Returns void