The state property of the VideoDecoder interface returns the current state of the underlying codec.
state
MDN Reference