Web Codecs APIwindow_and_dedicated
The clone() method of the VideoFrame interface creates a new VideoFrame object referencing the same media resource as the original.
Syntax
clone()
Parameters
None.
Return value
A new cloned VideoFrame object.
Exceptions
InvalidStateErrorDOMException- : Thrown if the
VideoFrameobject has been transferred.
- : Thrown if the
Examples
The following example clones a copy of VideoFrame as videoFrame2.
let videoFrame2 = VideoFrame.clone();
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
