VideoFrame: clone()-Methode
Baseline 2024Newly available
Since September 2024, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Hinweis: Diese Funktion ist in Dedicated Web Workers verfügbar.
Die clone()
-Methode des VideoFrame
-Interfaces erstellt ein neues VideoFrame
-Objekt, das auf die gleiche Medienressource wie das Original verweist.
Syntax
js
clone()
Parameter
Keine.
Rückgabewert
Ein neues geklontes VideoFrame
-Objekt.
Ausnahmen
InvalidStateError
DOMException
-
Wird ausgelöst, wenn das
VideoFrame
-Objekt übertragen wurde.
Beispiele
Im folgenden Beispiel wird eine Kopie von VideoFrame
als videoFrame2
geklont.
js
let videoFrame2 = VideoFrame.clone();
Spezifikationen
Specification |
---|
WebCodecs # dom-videoframe-clone |