Skip to content
Class

VideoSampleColorSpace

Describes the color space of a VideoSample. Corresponds to the WebCodecs API's VideoColorSpace.

Used by

Constructor

ts
constructor(
	init?: VideoColorSpaceInit,
): VideoSampleColorSpace;

Creates a new VideoSampleColorSpace.

Properties

fullRange

ts
readonly fullRange: boolean | null;

Whether the color values use the full range or limited range.

matrix

ts
readonly matrix: VideoMatrixCoefficients | null;

The color matrix coefficients used.

primaries

ts
readonly primaries: VideoColorPrimaries | null;

The color primaries standard used.

transfer

ts
readonly transfer: VideoTransferCharacteristics | null;

The transfer characteristics used.

Methods

toJSON()

ts
toJSON(): VideoColorSpaceInit;

Serializes the color space to a JSON object.

Released under the Mozilla Public License 2.0.