MediaVideoFrame Class

A frame of a video, painted in the box of the video element by the rendering backend of the browsing context and drawn by drawImage(): pixels in the RGBA format (4 bytes per pixel, not premultiplied, sRGB), from the top-left pixel, row by row.

public sealed class MediaVideoFrame

Constructors

NameDescription
MediaVideoFrame(int, int, ReadOnlyMemory<byte>)Creates a frame from its pixels.

MediaVideoFrame(int, int, ReadOnlyMemory<byte>)

MediaBackend.cs

Creates a frame from its pixels.

public MediaVideoFrame(int width, int height, ReadOnlyMemory<byte> pixels)

Parameters

width int
The width of the frame in pixels.
height int
The height of the frame in pixels.
pixels ReadOnlyMemory<byte>
The pixels: width x height x 4 bytes (RGBA, not premultiplied, sRGB).

Properties

NameDescription
HeightGets the height of the frame in pixels.
PixelsGets the pixels of the frame (RGBA, not premultiplied, sRGB).
WidthGets the width of the frame in pixels.

Gets the height of the frame in pixels.

public int Height { get; }

Property value

int

Gets the pixels of the frame (RGBA, not premultiplied, sRGB).

public ReadOnlyMemory<byte> Pixels { get; }

Property value

ReadOnlyMemory<byte>

Gets the width of the frame in pixels.

public int Width { get; }

Property value

int