WebCodecs APIwindow_and_dedicated
The VideoColorSpace interface of the WebCodecs API represents the color space of a video.
Constructor
- VideoColorSpace.VideoColorSpace
- : Creates a new
VideoColorSpaceobject.
- : Creates a new
Instance properties
- VideoColorSpace.primaries
- : A string containing the color primary describing the color gamut of a video sample.
- VideoColorSpace.transfer
- : A string containing the transfer characteristics of video samples.
- VideoColorSpace.matrix
- : A string containing the matrix coefficients describing the relationship between sample component values and color coordinates.
- VideoColorSpace.fullRange
- : A Boolean. If
trueindicates that full-range color values are used.
- : A Boolean. If
Instance methods
- VideoColorSpace.toJSON()
- : Returns a JSON-serializable plain object representing the
VideoColorSpaceobject. Automatically called by JSON.stringify().
- : Returns a JSON-serializable plain object representing 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
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
