Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Note: This feature is available in Dedicated Web Workers.
The flush() method of the VideoEncoder interface forces all pending encodes to complete.
flush()None.
A Promise that resolves once the encoder's initialization is completed and all pending EncodedVideoChunks are returned.
InvalidStateError DOMExceptionReturned if the Promise is rejected because the state is not configured.
The following example flushes the VideoEncoder.
VideoEncoder.flush();