Class Track<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

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

  • Detaches from all attached elements

    Returns HTMLMediaElement[]

  • Detach from a single element

    Parameters

    • element: HTMLMediaElement

    Returns HTMLMediaElement