Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with safari browser #39

Open
abhishekprologic opened this issue Feb 2, 2022 · 11 comments
Open

Does not work with safari browser #39

abhishekprologic opened this issue Feb 2, 2022 · 11 comments

Comments

@abhishekprologic
Copy link

Works fine with Chrome and Firefox.

I am using Safari version 15.0.
Following errors occur in Safari browser on opening live demo:

[Warning] wasm streaming compile failed: CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 19 (tflite-simd.js, line 9)

[Warning] falling back to ArrayBuffer instantiation (tflite-simd.js, line 9)

[Warning] failed to asynchronously prepare wasm: CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16 (tflite-simd.js, line 9)

[Warning] CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16 (tflite-simd.js, line 9)

[Warning] Failed to create TFLite SIMD WebAssembly module. – RuntimeError: abort(CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16). Build with -s ASSERTIONS=1 for more info. (main.0187bf97.chunk.js, line 1)

*RuntimeError: abort(CompileError: WebAssembly.Module doesn't parse at byte 5: can't get Function local's type in group 1, in function at index 16). Build with -s ASSERTIONS=1 for more info.
Screenshot 2022-02-02 at 6 56 49 PM
*

@Volcomix
Copy link
Owner

Volcomix commented Feb 2, 2022

This is supposed to be a warning. The demo handles this case and should work fine except that SIMD isn't supported by the browser. As a result, the default backend should be WebAssembly and WebAssembly SIMD should be disabled.
image

@abhishekprologic
Copy link
Author

Not working with any other options too.

@Volcomix
Copy link
Owner

Volcomix commented Feb 2, 2022

I'm not sure to understand what is not working then. In the screenshot you shared, we can see the background showing up at 60fps and given that no face is on the camera, I can't understand what is going wrong.
Please could you share another screenshot with either a face on the camera or either one of the provided images as input?

@abhishekprologic
Copy link
Author

Screenshot 2022-02-03 at 9 40 36 AM

@Volcomix
Copy link
Owner

Volcomix commented Feb 4, 2022

Thanks you for taking the time to share this screenshot. The console output is actually interesting.
On my Safari 15.2 (no idea if the minor version does matter) where I have it working, the difference I can see is that I don't have this first Promise Rejection error that appears on your screenshot. I'm gonna try to deploy a version with more info on all the promise errors to see if it could help the investigation.
I'll let you know once it's deployed so that you could do another test if you don't mind.

@Volcomix
Copy link
Owner

Volcomix commented Feb 5, 2022

Actually I tried to make every promise of the code fail and I didn't manage to reproduce both the face not showing and the background being rendered. So I'm now wondering if there could be an issue when trying to read the pixels from the camera stream. Do you have the same result with the example source images or does it happen only with your camera?

@abhishekprologic
Copy link
Author

Yes, same results with the images and video. I’m using Safari on Mac Mini.

@Volcomix
Copy link
Owner

Volcomix commented Feb 5, 2022

Thanks for your answer, I'm gonna investigate differently then.

@abhishekprologic
Copy link
Author

Same results with
https://github.com/spasimir21/camera-processor/tree/main/%40camera-processor/virtual-background

which is based on this library.

@Volcomix
Copy link
Owner

Volcomix commented Feb 5, 2022

Related issue: spasimir21/camera-processor#5

That's interesting cause it seems that for now, @spasimir21 repo doesn't include yet all the WebGL stuff so I guess I can exclude everything related to this from the root cause.

@miketm01
Copy link

I don't know if it is related to this issue, but it's related to Safari browsers, booth on web and mobile. If the source video is not shown, the output video will be blocked at the last frame. I managed to overcome this problem, with position absolute, and opacity 0. Hope this helps someone dealing with Safari!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants