MDN self-hosted library · e01.org

VideoEncoder: flush() method

WebCodecs APIwindowanddedicated

WebCodecs APIwindow_and_dedicated

The flush() method of the VideoEncoder interface forces all pending encodes to complete.

Syntax

flush()

Parameters

None.

Return value

A Promise that resolves once the encoder's initialization is completed and all pending EncodedVideoChunks are returned.

Exceptions

  • InvalidStateError DOMException
  • : Returned if the Promise is rejected because the state is not configured.

Examples

The following example flushes the VideoEncoder.

VideoEncoder.flush();

Specifications

Browser compatibility