Skip to content
Type

VideoSampleInit

Metadata used for VideoSample initialization.

ts
type VideoSampleInit = {
	format?: VideoSamplePixelFormat;
	codedWidth?: number;
	codedHeight?: number;
	rotation?: Rotation;
	timestamp?: number;
	duration?: number;
	colorSpace?: VideoColorSpaceInit;
	layout?: PlaneLayout[];
};

See VideoSamplePixelFormat and Rotation.

Used by

Properties

format

ts
format?: VideoSamplePixelFormat;

The internal pixel format in which the frame is stored. See pixel formats

See VideoSamplePixelFormat.

codedWidth

ts
codedWidth?: number;

The width of the frame in pixels.

codedHeight

ts
codedHeight?: number;

The height of the frame in pixels.

rotation

ts
rotation?: Rotation;

The rotation of the frame in degrees, clockwise.

See Rotation.

timestamp

ts
timestamp?: number;

The presentation timestamp of the frame in seconds.

duration

ts
duration?: number;

The duration of the frame in seconds.

colorSpace

ts
colorSpace?: VideoColorSpaceInit;

The color space of the frame.

layout

ts
layout?: PlaneLayout[];

The byte layout of the planes of the frame.

Released under the Mozilla Public License 2.0.