Closed martenrichter closed 1 year ago
A couple things to fix:
(globalThis || window)
yourself.Sorry about 1. I thought I changed it back everywhere.... (so I will do that)
Regarding 2: Using (globalThis || window)
would it not also break in workers in these earlier systems?
What about (globalThis || self || window)
?
It already breaks on workers ;) . It's fine to add that too, I'm just principally concerned with not breaking on systems where it currently works.
In order to also potentially not harm node.js I added a polyfill. (not yet tested, will do it next weekend, or test it yourself). But also changes in libav.js are required for workers, it is buried in the last changes in the closed issue.
After getting the correct polyfill. This is now tested to be correctly loaded. At least I get the same anull error than last week. A PR for libav.js is coming soon to supply loading code in bundler context.
I am feeding my Video- and AudioCodec from a Worker Thread, this PR should fix some exceptions, which occur during the initial loading of the polyfill. There may be further related issues may be present, these will be addressed in later PR, while testing the components. It would be nice, if you consider adding these changes.