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(); await libav.load();
if (options.polyfill) { if (options.polyfill) {
for (const exp of [ globalThis.VideoDecoder = vdec.VideoDecoder;
'EncodedVideoChunk', globalThis.VideoFrame = vf.VideoFrame;
'VideoFrame', globalThis.EncodedVideoChunk = evc.EncodedVideoChunk;
'VideoDecoder',
]) {
if (!(global as any)[exp]) {
(global as any)[exp] = (this as any)[exp];
}
}
} }
await rendering.load(libavOptions, !!options.polyfill); await rendering.load(libavOptions, !!options.polyfill);