MCPcopy Create free account
hub / github.com/Vanilagy/webcodecs-polyfill / polyfillWebCodecsApi

Function polyfillWebCodecsApi

src/polyfill.ts:28–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 * don't already exist.
27 */
28export const polyfillWebCodecsApi = () => {
29 globalThis.VideoDecoder ??= VideoDecoderPolyfill;
30 globalThis.AudioDecoder ??= AudioDecoderPolyfill;
31 globalThis.VideoEncoder ??= VideoEncoderPolyfill;
32 globalThis.AudioEncoder ??= AudioEncoderPolyfill;
33 globalThis.EncodedVideoChunk ??= EncodedVideoChunkPolyfill;
34 globalThis.EncodedAudioChunk ??= EncodedAudioChunkPolyfill;
35 globalThis.VideoFrame ??= VideoFramePolyfill;
36 globalThis.VideoColorSpace ??= VideoColorSpacePolyfill;
37 globalThis.AudioData ??= AudioDataPolyfill;
38 globalThis.DOMRectReadOnly ??= DOMRectReadOnlyPolyfill;
39};

Calls

no outgoing calls

Tested by

no test coverage detected