docs.rodeo

MDN Web Docs mirror

MediaStream

{{APIRef("Media Capture and Streams")}} 

The MediaStream interface of the {{domxref("Media Capture and Streams API", "", "", "nocode")}}  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 {{domxref("MediaStreamTrack")}} .

You can obtain a MediaStream object either by using the constructor or by calling functions such as {{domxref("MediaDevices.getUserMedia()")}} , {{domxref("MediaDevices.getDisplayMedia()")}} , or {{domxref("HTMLCanvasElement.captureStream()")}}  and {{domxref("HTMLMediaElement.captureStream()")}} .

{{InheritanceDiagram}} 

Constructor

Instance properties

This interface inherits properties from its parent, {{domxref("EventTarget")}} .

Instance methods

This interface inherits methods from its parent, {{domxref("EventTarget")}} .

Events

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN