Definition
WebCodecs defines VideoFrame
[Exposed=(Window,DedicatedWorker), Serializable, Transferable]
interface VideoFrame {
constructor(CanvasImageSource image, optional VideoFrameInit init = {});
readonly attribute VideoPixelFormat? format;
readonly attribute unsigned long codedWidth;
readonly attribute unsigned long codedHeight;
readonly attribute DOMRectReadOnly? codedRect;
readonly attribute DOMRectReadOnly? visibleRect;
readonly attribute unsigned long displayWidth;
readonly attribute unsigned long displayHeight;
readonly attribute unsigned long long? duration; // microseconds
readonly attribute long long timestamp; // microseconds
readonly attribute VideoColorSpace colorSpace;
VideoFrameMetadata metadata();
unsigned long allocationSize(
optional VideoFrameCopyToOptions options = {});
VideoFrame clone();
undefined close();
};
Methods and attributes that return objects implementing VideoFrame
Referring IDL interfaces/dictionaries
Referring specifications
- HTML Standard refers to
VideoFrame
- WebGL Specification refers to
VideoFrame
- WebGPU refers to
VideoFrame