CanvasCaptureMediaStreamTrack: canvas-Eigenschaft
Die schreibgeschützte canvas
-Eigenschaft der CanvasCaptureMediaStreamTrack
-Schnittstelle gibt das HTMLCanvasElement
zurück, von dem die Frames erfasst werden.
Wert
Ein HTMLCanvasElement
, das die Quelle der erfassten Frames angibt.
Beispiel
js
// Find the canvas element to capture
const canvasElt = document.querySelector("canvas");
// Get the stream
const stream = canvasElt.captureStream(25); // 25 FPS
// Do things to the stream
// …
// Obtain the canvas associated with the stream
const canvas = stream.canvas;
Spezifikationen
Specification |
---|
Media Capture from DOM Elements # dom-canvascapturemediastreamtrack-canvas |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
canvas |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
HTMLCanvasElement.captureStream()
um einen Stream zu erstellen, der ein bestimmtes Canvas-Element erfasst.<canvas>