WebCodecs APIwindow_and_dedicated
The VideoColorSpace() constructor creates a new VideoColorSpace object which represents a video color space.
Syntax
new VideoColorSpace()
new VideoColorSpace(options)
Parameters
All values default to null when they are not present.
options- : An object containing the following:
primaries- : One of the following strings:
"bt709""bt470bg""smpte170m"
- : One of the following strings:
transfer- : One of the following strings:
"bt709""smpte170m""iec61966-2-1"
- : One of the following strings:
matrix- : One of the following strings:
"rgb""bt709""bt470bg""smpte170m"
- : One of the following strings:
fullRange- : A Boolean,
trueif full-range color values are used in the video.
- : A Boolean,
- : An object containing the following:
Examples
The following example creates a new VideoColorSpace object with VideoColorSpace.primaries set to "bt709", and VideoColorSpace.primaries set to true.
const options = {
primaries: "bt709",
fullRange: true,
};
const colorSpace = new VideoColorSpace(options);
console.log(colorSpace);
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
