Media Viewer: Fix previews in Firefox (#3100)
This commit is contained in:
parent
7f2633fce5
commit
c69bdb0c06
@ -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);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user