Firefox Tomorrow

web api instance method

VideoEncoder: flush() method

View on MDN ↗

Secure contextAvailable in workers

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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.