web api interface
VideoColorSpace
Available in workers
The VideoColorSpace interface of the WebCodecs API represents the color space of a video.
Constructor
VideoColorSpace()- : Creates a new
VideoColorSpaceobject.
- : Creates a new
Instance properties
primariesRead only- : A string containing the color primary describing the color gamut of a video sample.
transfer- : A string containing the transfer characteristics of video samples.
matrix- : A string containing the matrix coefficients describing the relationship between sample component values and color coordinates.
fullRange- : A
Boolean. Iftrueindicates that full-range color values are used.
- : A
Instance methods
toJSON()- : Returns a JSON representation of the
VideoColorSpaceobject.
- : Returns a JSON representation of the
Examples
In the following example, colorSpace is a VideoColorSpace object returned from VideoFrame. The object is then printed to the console.
let colorSpace = VideoFrame.colorSpace;
console.log(colorSpace);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.