ImageDecoder
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The ImageDecoder
interface of the WebCodecs API provides a way to unpack and decode encoded image data.
Constructor
ImageDecoder()
-
Creates a new
ImageDecoder
object.
Properties
ImageDecoder.complete
Read only-
Returns a
boolean
indicating whether the data is completely buffered. ImageDecoder.completed
Read only-
Returns a
Promise
that resolves oncecomplete
is true. ImageDecoder.tracks
Read only-
Returns an
ImageTrackList
object listing the available tracks and providing a method for selecting a track to decode.
Methods
ImageDecoder.close()
-
Ends all pending work and releases system resources.
ImageDecoder.decode()
-
Enqueues a control message to decode the frame of an image.
ImageDecoder.reset()
-
Resets all states including configuration, control messages in the control message queue, and all pending callbacks.
Specifications
Specification |
---|
WebCodecs # imagedecoder-interface |
Browser compatibility
BCD tables only load in the browser