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

Accessing webcam data is broken by canvas fingerprinting protections (firefox, or any browser with adblockers) #398

Open
3 tasks done
clementpoiret opened this issue Jan 19, 2024 · 3 comments

Comments

@clementpoiret
Copy link

Please follow the general troubleshooting steps first:

Bug reports:

When fingerprinting protections are in place, such as in Firefox when privacy.resistFingerprinting is true, or when a user uses any kind of privacy-preserving addons such as adblock plus, webcamRef.current.getScreenshot(); is corrupted. Here is the console warning inside Firefox's Console :

Blocked third party https://cdpn.io/mozmorris/fullpage/gOOoqpw?anon=true&view= from extracting canvas data.

Related to:
https://support.mozilla.org/en-US/questions/1398931

The official example is simply a reproduction: https://codepen.io/mozmorris/pen/gOOoqpw

This also happens in first-party when "no user input is detected".

Are you aware of any other way to access the frames of the video without depending on what the canva is drawing?

As more and more users are using tools to enhance their privacy, the getScreenshot() fn will fail more and more in the future...

@mozmorris
Copy link
Owner

Thanks for reporting this @clementpoiret. Is it still blocked when access a site directly? https://www.mozmorris.com/react-webcam/examples/

There have been some movement in this area, such as the takePhoto api but my understanding that's still not supported on Firefox (funnily enough).

@clementpoiret
Copy link
Author

When accessing it directly, I get Blocked https://www.mozmorris.com/react-webcam/examples/ from extracting canvas data, but prompting the user. on firefox, which is better than nothing. However, discarding the prompt lead to the following screenshot

image

Yes I also found the ImageCapture API, but it only works in chrome, not FF (experimental config available) nor Safari :(
https://googlechrome.github.io/samples/image-capture/grab-frame-take-photo.html

@rvdende
Copy link

rvdende commented Apr 13, 2024

and if you use the webcamRef?.current?.getCanvas() ? Does it still get blocked? From the canvas element you can read the data directly?

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