Chartbreaker
    Preparing search index...

    Interface VideoFrame

    The VideoFrame interface of the Web Codecs API represents a frame of a video.

    MDN Reference

    interface VideoFrame {
        codedHeight: number;
        codedRect: null | DOMRectReadOnly;
        codedWidth: number;
        colorSpace: VideoColorSpace;
        displayHeight: number;
        displayWidth: number;
        duration: null | number;
        format: null | VideoPixelFormat;
        timestamp: number;
        visibleRect: null | DOMRectReadOnly;
        allocationSize(options?: VideoFrameCopyToOptions): number;
        clone(): VideoFrame;
        close(): void;
        copyTo(
            destination: AllowSharedBufferSource,
            options?: VideoFrameCopyToOptions,
        ): Promise<PlaneLayout[]>;
    }
    Index

    Properties

    codedHeight: number

    The codedHeight property of the VideoFrame interface returns the height of the VideoFrame in pixels, potentially including non-visible padding, and prior to considering potential ratio adjustments.

    MDN Reference

    codedRect: null | DOMRectReadOnly

    The codedRect property of the VideoFrame interface returns a DOMRectReadOnly with the width and height matching VideoFrame.codedWidth and VideoFrame.codedHeight.

    MDN Reference

    codedWidth: number

    The codedWidth property of the VideoFrame interface returns the width of the VideoFrame in pixels, potentially including non-visible padding, and prior to considering potential ratio adjustments.

    MDN Reference

    colorSpace: VideoColorSpace

    The colorSpace property of the VideoFrame interface returns a VideoColorSpace object representing the color space of the video.

    MDN Reference

    displayHeight: number

    The displayHeight property of the VideoFrame interface returns the height of the VideoFrame after applying aspect ratio adjustments.

    MDN Reference

    displayWidth: number

    The displayWidth property of the VideoFrame interface returns the width of the VideoFrame after applying aspect ratio adjustments.

    MDN Reference

    duration: null | number

    The duration property of the VideoFrame interface returns an integer indicating the duration of the video in microseconds.

    MDN Reference

    format: null | VideoPixelFormat

    The format property of the VideoFrame interface returns the pixel format of the VideoFrame.

    MDN Reference

    timestamp: number

    The timestamp property of the VideoFrame interface returns an integer indicating the timestamp of the video in microseconds.

    MDN Reference

    visibleRect: null | DOMRectReadOnly

    The visibleRect property of the VideoFrame interface returns a DOMRectReadOnly describing the visible rectangle of pixels for this VideoFrame.

    MDN Reference

    Methods

    • The clone() method of the VideoFrame interface creates a new VideoFrame object referencing the same media resource as the original.

      MDN Reference

      Returns VideoFrame

    • The close() method of the VideoFrame interface clears all states and releases the reference to the media resource.

      MDN Reference

      Returns void