Definition
Media Capture and Streams defines MediaStreamTrack
[Exposed=Window]
interface MediaStreamTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString id;
readonly attribute DOMString label;
attribute boolean enabled;
readonly attribute boolean muted;
attribute EventHandler onmute;
attribute EventHandler onunmute;
readonly attribute MediaStreamTrackState readyState;
attribute EventHandler onended;
MediaStreamTrack clone();
undefined stop();
MediaTrackCapabilities getCapabilities();
MediaTrackConstraints getConstraints();
MediaTrackSettings getSettings();
Promise<undefined> applyConstraints(optional MediaTrackConstraints constraints = {});
};
This interface is extended in the following specifications:
- The Capture-Handle Actions Mechanism
partial interface MediaStreamTrack { sequence<DOMString> getSupportedCaptureActions(); Promise<undefined> sendCaptureAction(CaptureAction action); };
- Capture Handle - Bootstrapping Collaboration when Screensharing
partial interface MediaStreamTrack { CaptureHandle? getCaptureHandle(); }; partial interface MediaStreamTrack { attribute EventHandler oncapturehandlechange; };
- MediaStreamTrack Content Hints
partial interface MediaStreamTrack { attribute DOMString contentHint; };
- Identity for WebRTC 1.0
partial interface MediaStreamTrack { readonly attribute boolean isolated; attribute EventHandler onisolationchange; };
Consolidated IDL (across mixin and partials)
[Exposed=Window]
interface MediaStreamTrack : EventTarget {
readonly attribute DOMString kind;
readonly attribute DOMString id;
readonly attribute DOMString label;
attribute boolean enabled;
readonly attribute boolean muted;
attribute EventHandler onmute;
attribute EventHandler onunmute;
readonly attribute MediaStreamTrackState readyState;
attribute EventHandler onended;
MediaStreamTrack clone();
undefined stop();
MediaTrackCapabilities getCapabilities();
MediaTrackConstraints getConstraints();
MediaTrackSettings getSettings();
Promise<undefined> applyConstraints(optional MediaTrackConstraints constraints = {});
sequence<DOMString> getSupportedCaptureActions();
Promise<undefined> sendCaptureAction(CaptureAction action);
CaptureHandle? getCaptureHandle();
attribute EventHandler oncapturehandlechange;
attribute DOMString contentHint;
readonly attribute boolean isolated;
attribute EventHandler onisolationchange;
};
Methods and attributes that return objects implementing MediaStreamTrack
Referring IDL interfaces/dictionaries
AudioContext
BrowserCaptureMediaStreamTrack
CanvasCaptureMediaStreamTrack
ImageCapture
MediaStream
MediaStreamTrack
MediaStreamTrackAudioSourceOptions
MediaStreamTrackEvent
MediaStreamTrackEventInit
MediaStreamTrackProcessorInit
RTCPeerConnection
RTCRtpReceiver
RTCRtpSender
RTCTrackEvent
RTCTrackEventInit
VideoTrackGenerator
Referring specifications
- The Capture-Handle Actions Mechanism refers to
MediaStreamTrack
- Capture Handle - Bootstrapping Collaboration when Screensharing refers to
MediaStreamTrack
- MediaStream Image Capture refers to
MediaStreamTrack
- Media Capture from DOM Elements refers to
MediaStreamTrack
- Region Capture refers to
MediaStreamTrack
- MediaStreamTrack Insertable Media Processing using Streams refers to
MediaStreamTrack
- MediaStreamTrack Content Hints refers to
MediaStreamTrack
- Web Audio API 1.1 refers to
MediaStreamTrack
- Identity for WebRTC 1.0 refers to
MediaStreamTrack
- WebRTC: Real-Time Communication in Browsers refers to
MediaStreamTrack