Class LocalTrack<TrackKind>Abstract

Type Parameters

Hierarchy (view full)

Properties

attachedElements: HTMLMediaElement[] = []
isMuted: boolean = false
kind: TrackKind
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

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>