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

    • OptionalloggerOptions: LoggerOptions

    Returns LocalVideoTrack

Properties

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

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

signalClient?: SignalClient
simulcastCodecs: Map<
    | "vp8"
    | "h264"
    | "vp9"
    | "av1", SimulcastTrackInfo> = ...
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

Methods

  • Parameters

    • codec:
          | "vp8"
          | "h264"
          | "vp9"
          | "av1"
    • Optionalencodings: RTCRtpEncodingParameters[]

    Returns undefined | SimulcastTrackInfo

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

  • Parameters

    • codec:
          | "vp8"
          | "h264"
          | "vp9"
          | "av1"
    • sender: RTCRtpSender

    Returns void