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
InvalidStateErrorDOMException- : Returned if the Promise is rejected because the VideoEncoder.state is not
configured.
- : Returned if the Promise is rejected because the VideoEncoder.state is not
Examples
The following example flushes the VideoEncoder.
VideoEncoder.flush();
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
