Media Viewer: Fix previews in Firefox (#3100)

This commit is contained in:
Alexander Zinchuk 2023-04-27 18:53:20 +04:00
parent 7f2633fce5
commit c69bdb0c06

View File

@ -54,15 +54,9 @@ export async function load(
await libav.load();
if (options.polyfill) {
for (const exp of [
'EncodedVideoChunk',
'VideoFrame',
'VideoDecoder',
]) {
if (!(global as any)[exp]) {
(global as any)[exp] = (this as any)[exp];
}
}
globalThis.VideoDecoder = vdec.VideoDecoder;
globalThis.VideoFrame = vf.VideoFrame;
globalThis.EncodedVideoChunk = evc.EncodedVideoChunk;
}
await rendering.load(libavOptions, !!options.polyfill);