LiveKit JS Client SDK - v2.23.0
    Preparing search index...

    Class LocalVideoTrack

    Hierarchy (View Summary)

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

    attachedElements: HTMLMediaElement[] = []
    isMuted: boolean = false
    kind: Video
    lastEncodedDimensions?: Dimensions
    publishOptions?: TrackPublishOptions
    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"
        | "h265",
        SimulcastTrackInfo,
    > = ...
    source: Source
    • get constraints(): MediaTrackConstraints

      Returns MediaTrackConstraints

    • get hasPreConnectBuffer(): boolean

      Returns boolean

    • get mediaStreamTrack(): MediaStreamTrack

      Returns MediaStreamTrack

    • Parameters

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

      Returns SimulcastTrackInfo | undefined

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

      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>

    • Experimental

      Designed for lower powered devices, reduces video publishing quality and disables simulcast.

      Returns Promise<void>

    • Returns Promise<void | ("vp8" | "h264" | "vp9" | "av1" | "h265")[]>

    • Parameters

      • preference: RTCDegradationPreference

      Returns Promise<void>

    • Sets a processor on this track, and wires its processed track into the simulcast codecs.

      The processor is destroyed when the track is stopped, which unpublishing and disconnecting both do by default, so it has to be set again after reconnecting. See TrackProcessor for the full lifecycle.

      Parameters

      Returns Promise<void>

    • Parameters

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

      Returns Promise<void>