const colorSpace = new VideoColorSpace({
primaries: "bt709",
transfer: "bt709",
matrix: "bt709",
fullRange: true,
});
const json = colorSpace.toJSON();
console.log(json);
// { fullRange: true, matrix: "bt709", primaries: "bt709", transfer: "bt709" }
console.log(typeof json); // "object"VideoColorSpace: toJSON() method / notebook
VideoColorSpace: toJSON() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
console.log(JSON.stringify(colorSpace));