Hierarchy (view full)

Constructors

  • Parameters

    • mediaTrack: MediaStreamTrack
    • Optionalconstraints: MediaTrackConstraints

      MediaTrackConstraints that are being used when restarting or reacquiring tracks

    • userProvidedTrack: boolean = true

      Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK

    • OptionalaudioContext: AudioContext
    • OptionalloggerOptions: LoggerOptions

    Returns LocalAudioTrack

Properties

attachedElements: HTMLMediaElement[] = []
isMuted: boolean = false
kind: Audio
sid?: string

sid is set after track is published to server, or if it's a remote track

source: Source
streamState: StreamState = Track.StreamState.Active

indicates current state of stream, it'll indicate paused if the track has been paused by congestion controller

Accessors

  • get currentBitrate(): number
  • current receive bits per second

    Returns number

  • get enhancedNoiseCancellation(): boolean
  • boolean indicating whether enhanced noise cancellation is currently being used on this track

    Returns boolean

Methods

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

    Returns HTMLMediaElement

  • attaches track to an existing HTMLAudioElement or HTMLVideoElement

    Parameters

    • element: HTMLMediaElement

    Returns HTMLMediaElement

  • Parameters

    • normalize: boolean = true

    Returns Promise<undefined | string>

    DeviceID of the device that is currently being used for this track

  • pauses publishing to the server without disabling the local MediaStreamTrack this is used to display a user's own video locally while pausing publishing to the server. this API is unsupported on Safari < 12 due to a bug

    Returns Promise<void>