Class: Track

Track

A Track represents audio or video that can be sent to or received from a Room. Tracks abstract away the notion of MediaStream and MediaStreamTrack.


Properties:
Name Type Description
id Track.ID

This Track's ID

isStarted boolean

Whether or not the Track has started

isEnabled boolean

Whether or not the Track is enabled (i.e., whether it is paused or muted)

kind string

The kind of the underlying MediaStreamTrack; e.g. "audio" or "video"

mediaStream MediaStream

The underlying MediaStream

mediaStreamTrack MediaStreamTrack

The underlying MediaStreamTrack

Fires:

Type Definitions


ID

The Track ID is a string identifier for the Track.

Type:
  • string

Events


disabled

The Track was disabled. For AudioTracks this means "muted", and for VideoTracks this means "paused".

Parameters:
Name Type Description
track Track

The Track that was disabled


enabled

The Track was enabled. For AudioTracks this means "unmuted", and for VideoTracks this means "unpaused".

Parameters:
Name Type Description
track Track

The Track that was enabled


started

The Track started. This means that the Track contains enough audio or video to begin playback.

Parameters:
Name Type Description
track Track

The Track that started