VideoColorSpace: toJSON()-Methode

Hinweis: Diese Funktion ist in Dedicated Web Workers verfügbar.

Die toJSON()-Methode der VideoColorSpace-Schnittstelle ist ein Serializer, der eine JSON-Darstellung des VideoColorSpace-Objekts zurückgibt.

Syntax

js
toJSON()

Parameter

Keine.

Rückgabewert

Ein JSON-Objekt.

Beispiele

Im folgenden Beispiel ist colorSpace ein VideoColorSpace-Objekt, das von VideoFrame zurückgegeben wird. Dieses Objekt wird dann als JSON in die Konsole ausgegeben.

js
let colorSpace = VideoFrame.colorSpace;
console.log(colorSpace.toJSON());

Spezifikationen

Specification
WebCodecs
# dom-videocolorspace-tojson

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
toJSON

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support