Back to Content

VideoDecoder: close() method

files/en-us/web/api/videodecoder/close/index.md

latest505 B
Original Source

{{APIRef("WebCodecs API")}}{{SecureContext_Header}}{{AvailableInWorkers("window_and_dedicated")}}

The close() method of the {{domxref("VideoDecoder")}} interface ends all pending work and releases system resources.

Syntax

js-nolint
close()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Examples

The following example closes the VideoDecoder.

js
VideoDecoder.close();

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}