VideoEncoder: reset() method
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.
Thereset() method of theVideoEncoder interface synchronously cancels all pending encodes and callbacks, frees all underlying resources and sets thestate to "unconfigured".After callingreset(),configure() must be called before resumingencode() calls.
In this article
Syntax
js
reset()Parameters
None.
Return value
None (undefined).
Exceptions
InvalidStateErrorDOMExceptionThrown if the
stateis"closed".
Examples
The following example resets theVideoEncoder.
js
VideoEncoder.reset();Specifications
| Specification |
|---|
| WebCodecs> # dom-videoencoder-reset> |