AwaitedDOM/ MediaStream

The MediaStream interface represents a stream of media content. A stream consists of several tracks such as video or audio tracks. Each track is specified as an instance of MediaStreamTrack.You can obtain a MediaStream object either by using the constructor or by calling MediaDevices.getUserMedia().
Some user agents subclass this interface to provide more precise information or functionality, like in CanvasCaptureMediaStream.

Properties

.active
W3C

A Boolean value that returns true if the MediaStream is active, or false otherwise.

Type: Promise<boolean>

.id
W3C

A string containing 36 characters denoting a universally unique identifier (UUID) for the object.

Type: Promise<string>

Methods

.clone()
W3C

Returns a clone of the MediaStream object. The clone will, however, have a unique value for id.

Returns: MediaStream

Unimplemented Specs

Properties

onaddtrackonremovetrack

Methods

addTrack()getAudioTracks()
getTrackById()getTracks()
getVideoTracks()removeTrack()
addEventListener()dispatchEvent()
removeEventListener()

Edit this page on GitHub