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

    Class Track<TrackKind>Abstract

    Type Parameters

    Hierarchy (View Summary)

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

    • Detaches from all attached elements

      Returns HTMLMediaElement[]

    • Detach from a single element

      Parameters

      • element: HTMLMediaElement

      Returns HTMLMediaElement

    • Raw stats of the sender or receiver this track is attached to.

      Returns Promise<RTCStatsReport | undefined>

    • Parameters

      • OptionalsignalClient: SignalClient

      Returns void