WebCodecs APIwindow_and_dedicated
The dequeue event of the VideoEncoder interface fires to signal a decrease in VideoEncoder.encodeQueueSize.
This eliminates the need for developers to use a Window.setTimeout poll to determine when the queue has decreased, and more work should be queued up.
Syntax
Use the event name in EventTarget/addEventListener:
addEventListener("dequeue", (event) => { })
Alternatively, assign to the event handler property of the interface:
ondequeue = (event) => { }
Example
videoEncoder.addEventListener("dequeue", (event) => {
// Queue up more encoding work
});
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
