MDN self-hosted library · e01.org

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

  • InvalidStateError DOMException
  • : Thrown if the VideoFrame object has been transferred.

Examples

The following example clones a copy of VideoFrame as videoFrame2.

let videoFrame2 = VideoFrame.clone();

Specifications

Browser compatibility