Open pmarreck opened 1 year ago
Which version of iOS/Safari? I don't have iOS devices, could you debug Safari on iOS and check what's the error in web inspector?
I tried with Epiphany and it gave me the following error:
It means that SharedArrayBuffer
is not available in this browser - see the browser support - you have to use the single-thread version, I cannot do much with it.
Ah, how stupid of me. I did manage to get webinspector going in the mean time. Tried it with an iPhone 6s running 15.7.2 and an iPhone X running 16.2. Both gave me the same error when browsing the multithreaded demo page:
It seems that iOS has strict limits for allocating memory for WebAssembly. I don't have Apple devices to test it, but what if you decrease values in new WebAssembly.Memory({initial:ep/65536,maximum:32768,shared:!0})
in jxl_decoder.min.js (ep=104857600
)?
Setting ep=26214400
and initial:ep/8192,maximum:16384
will get the demo page loading with no issues for me.
I also tried with a larger 2MB image but that wouldn't load on single or multi threaded (and gave no errors whatsoever).
Impressive work! I tried it on various browsers, even the multithread version worked on anything modern BUT webkit-powered browsers (such as, unfortunately, ALL browsers on iOS). Is there a way to do multithread on webkit? (The non-multithread does seem to work fine.)