WebIDLpedia

MediaStreamTrack interface

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:

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

Referring specifications