copyTo() method of the
VideoFrame interface copies the contents of the
VideoFrame to an
copyTo(destination) copyTo(destination, options)
An object containing the following:
The rectangle of pixels to copy from the
VideoFrame. If unspecified, the
visibleRectwill be used. This is in the format of a dictionary object containing:
x: The x-coordinate.
y: The y-coordinate.
width: The width of the frame.
height: The height of the frame.
A list containing the following values for each plane in the
An integer representing the offset in bytes where the given plane begins.
An integer representing the number of bytes, including padding, used by each row of the plane. Planes may not overlap. If no
layoutis specified, the planes will be tightly packed.
Promise that resolves to the layout of the copy when the copy has completed.
The following example copies the entire contents of
let buffer = new Uint8Array(videoFrame.allocationSize()); let layout = await videoFrame.copyTo(buffer);
BCD tables only load in the browser