decode() method of the
ImageDecoder interface enqueues a control message to decode the frame of an image.
An object containing the following members:
An integer representing the index of the frame to decode. Defaults to
0(the first frame).
falseindicates that for progressive images the decoder may output an image with reduced detail.
promise that resolves with an object containing the following members:
If an error occurs the promise will resolve with one of the following exceptions:
The following example decodes the second frame (at index
1) and prints the resulting
VideoFrame to the console.
No specification found
No specification data found for
Check for problems with this page or contribute a missing
spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.