This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

MediaStreamTrack

Summary

A MediaStreamTrack is one of two kinds, audio or video, and represents the media source, such as a camera.

Properties

enabled
True if the track is still associated with its source.
kind
The value, either audio or video for the source of the track.
label
A user agent-assigned string that identifies the track source, as in “internal microphone.”
onended
Handles the ended event when fired on the MediaStream object.
onmute
Handles the muted event when fired on the MediaStream object.
readyState
The track’s ready state; values.

Methods

No methods.

Events

ended
The MediaStreamTrack object’s source will not provide data; this may be caused by the following:
  • the user has revoked permissions on the application
  • the source device has been disconnected
  • the remote peer has stopped sending data
  • the stop() method was invoked
muted
The MediaStreamTrack object’s source is temporarily unable to provide data.
unmuted
The MediaStreamTrack object’s source has resumed providing data.