web api interface
VideoDecoder
Secure contextAvailable in workers
The VideoDecoder interface of the WebCodecs API decodes chunks of video.
Constructor
VideoDecoder()- : Creates a new
VideoDecoderobject.
- : Creates a new
Instance properties
Inherits properties from its parent, EventTarget.
decodeQueueSizeRead only- : An integer representing the number of queued decode requests.
stateRead only- : Indicates the current state of decoder. Possible values are:
"unconfigured""configured""closed"
- : Indicates the current state of decoder. Possible values are:
Events
dequeue- : Fires to signal a decrease in
decodeQueueSize.
- : Fires to signal a decrease in
Static methods
VideoDecoder.isConfigSupported()- : Returns a promise indicating whether the provided
VideoDecoderConfigis supported.
- : Returns a promise indicating whether the provided
Instance methods
Inherits methods from its parent, EventTarget.
configure()- : Enqueues a control message to configure the video decoder for decoding chunks.
decode()- : Enqueues a control message to decode a given chunk of video.
flush()- : Returns a promise that resolves once all pending messages in the queue have been completed.
reset()- : Resets all states including configuration, control messages in the control message queue, and all pending callbacks.
close()- : Ends all pending work and releases system resources.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.