Class Track

A Track is used to interact with participant tracks.

Hierarchy

Properties

attachedElements: HTMLMediaElement[] = []

An array of all HTMLMediaElements that this track is currently attached to.

height: number

The height of the track if this is a video track

kind: TrackKind

The kind of track. Can be TrackKind.Video or TrackKind.Audio

muted: boolean

The mute status of this track

name: string

A name for this track

source: TrackSource = TrackSource.Unknown

The source of this track set when the track is created

tid: string

A unique id for this track.

track?: MediaStreamTrack

The MediaStreamTrack that contains the media for this track

width: number

The width of the track if this is a video track

Methods

  • Attach this track to an existing HTMLMediaElement

    Returns

    The existing HTMLMediaElement with the track attached

    Parameters

    • element: HTMLMediaElement

      A HTMLMediaElement to attach the track to.

    Returns HTMLMediaElement

  • Attach this track to a new HTMLMediaElement

    Returns

    A new HTMLMediaElement with the track attached.

    Returns HTMLMediaElement

  • Detach this track from an existing HTMLMediaElement

    Returns

    The existing HTMLMediaElement with the track detached

    Parameters

    • element: HTMLMediaElement

      A HTMLMediaElement to detach the track from.

    Returns HTMLMediaElement[]

  • Detach this track from all attached elements

    Returns

    all elements with the track detached

    Returns HTMLMediaElement[]

  • Get the kind of this track

    Returns

    What kind of track this is.

    Returns TrackKind

  • Get the source of this track

    Returns

    The source of this track.

    Returns TrackSource

  • Checks whether this track has a MediaStreamTrack

    Returns

    True if the Track has a MediaStreamTrack.

    Returns boolean

  • Get the mute status of this track

    Returns

    True if the track is muted.

    Returns boolean

Generated using TypeDoc