BrowserCaptureMediaStreamTrack
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Screen Capture API")}}{{SeeCompatTable}}
The **BrowserCaptureMediaStreamTrack** interface of the {{domxref("Screen Capture API", "Screen Capture API", "", "nocode")}} represents a single video track. It extends the {{domxref("MediaStreamTrack")}} class with methods to limit the part of a self-capture stream (for example, a user's screen or window) that is captured.
{{InheritanceDiagram}}
Instance methods
- {{domxref("BrowserCaptureMediaStreamTrack.clone", "clone()")}} {{Experimental_Inline}}
- : Returns an uncropped, unrestricted clone of the original
BrowserCaptureMediaStreamTrack. - {{domxref("BrowserCaptureMediaStreamTrack.cropTo", "cropTo()")}} {{Experimental_Inline}}
- : Crops a self-capture stream to the area in which a specified DOM element is rendered.
- {{domxref("BrowserCaptureMediaStreamTrack.restrictTo", "restrictTo()")}} {{Experimental_Inline}}
- : Restricts a self-capture stream to a specific DOM element.
Examples
See Using the Element Capture and Region Capture APIs for in-context example code.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- Screen Capture API
- Using the Element Capture and Region Capture APIs