AudioEncoder: state property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Note: This feature is available inDedicated Web Workers.
Thestate read-only property of theAudioEncoder interface returns the current state of the underlying codec.
In this article
Value
A string containing one of the following values:
"unconfigured"The codec is not configured for decoding.
"configured"The codec has a valid configuration and is ready.
"closed"The codec is no longer usable and system resources have been released.
Examples
The following example prints the state of theAudioEncoder to the console.
js
console.log(AudioEncoder.state);Specifications
| Specification |
|---|
| WebCodecs> # dom-audioencoder-state> |