VideoFrame: clone() method
Web Codecs APIwindowanddedicated
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.
Examples
The following example clones a copy of VideoFrame as videoFrame2.
let videoFrame2 = VideoFrame.clone();