Donaldcwl / browser-image-compression

Image compression in web browser
MIT License
1.3k stars 160 forks source link

Firefox: compression in Web Worker fails #15

Closed ghost closed 5 years ago

ghost commented 5 years ago

When trying to use the lib in Firefox (67.0.1 (64-Bit) or Dev. Edition: 68.0b8 (64-Bit)) it yields: "Run compression in web worker failed: document is not defined , fall back to main thread"

Donaldcwl commented 5 years ago

@RickStanley This is not an issue because Firefox does not currently support "OffscreenCanvas" API which is required for compression to work in web worker (reference: https://caniuse.com/#feat=offscreencanvas), so the current behavior in Firefox is expected to be fall back to main thread.