Definition
Media Capture and Streams defines MediaStream
[Exposed=Window]
interface MediaStream : EventTarget {
constructor();
constructor(MediaStream stream);
constructor(sequence<MediaStreamTrack> tracks);
readonly attribute DOMString id;
sequence<MediaStreamTrack> getAudioTracks();
sequence<MediaStreamTrack> getVideoTracks();
sequence<MediaStreamTrack> getTracks();
MediaStreamTrack? getTrackById(DOMString trackId);
undefined addTrack(MediaStreamTrack track);
undefined removeTrack(MediaStreamTrack track);
MediaStream clone();
readonly attribute boolean active;
attribute EventHandler onaddtrack;
attribute EventHandler onremovetrack;
};
Methods and attributes that return objects implementing MediaStream
MediaStream()
MediaStream()
MediaStream()
HTMLMediaElement.captureStream()
HTMLCanvasElement.captureStream()
MediaStream.clone()
MediaDevices.getUserMedia()
MediaDevices.getViewportMedia()
MediaDevices.getDisplayMedia()
MediaDevices.getUserMedia()
MediaDevices.getViewportMedia()
MediaDevices.getDisplayMedia()
MediaRecorder.stream
MediaDevices.getUserMedia()
MediaDevices.getViewportMedia()
MediaDevices.getDisplayMedia()
MediaStreamAudioDestinationNode.stream
MediaStreamAudioSourceNode.mediaStream
RTCTrackEvent.streams
HTMLMediaElement.srcObject
Referring IDL interfaces/dictionaries
Referring specifications
- HTML Standard refers to
MediaStream
- Media Capture from DOM Elements refers to
MediaStream
- Viewport Capture refers to
MediaStream
- MediaStream Recording refers to
MediaStream
- Screen Capture refers to
MediaStream
- Web Audio API 1.1 refers to
MediaStream
- WebRTC: Real-Time Communication in Browsers refers to
MediaStream