4 ms·
These sorts of features are added to JS because they enhance user interaction. The audio API is an obvious example, and one of the big reasons canvas is used is
by the_pwner224 7y ago
These sorts of features are added to JS because they enhance user interaction. The audio API is an obvious example, and one of the big reasons canvas is used is that it has good 2d performance and lets you draw arbitrary stuff easily - good for game. You can't decouple this from the hardware; audio will need to go through the sound card and removing GPU acceleration from canvas kills it. The only thing that can be done is slightly fuzzing inputs the program collects (the saved PNG or the listened audio) - but this again interferes with real use cases, such as web audio editors and image editors, where this method forces lossy editing and importing.
Already I have to use another browser to use games or other 3D content because I have WebGL disabled in Firefox, and for 2d stuff the resistFingerprinting option reduces timer accuracy, which messes with game loop timing and makes the game totally unplayable. Making audio and video even harder to use is not good.
The only solution is to not allow this stuff to happen in the first place by using a permissions system. Adding more permissions popups is bad, so permission needs to be implicitly allowed by the user. Autoplay is a good example of this, calls to play() are blocked unless the call is being made in response to a click handler. Permissions for really recording audio/video through a webcam/mic also work well.
- quotemstr 7y ago> You can't decouple this from the hardware; audio will need to go through the sound card and removing GPU acceleration from canvas kills it. What you can do is require that the hardware produce bit-identical output for given input no matter how it's actually implemented, a bit like how HTML5 exactly defines rendering for any stream of input characters nowadays. Sure, this level of exactness might impose a performance cost, but it would improve privacy. OTOH, you still have timing fingerprinting, so maybe you just can't win.
- munk-a 7y agoI'd like properly anonymous stuff as well, but I agree and understand you argument. Given the performance hit we'd need to take to accomplish that's it'd be almost akin to paying a tax or protection fee in terms of cycles to avoid compromise - "It'd be a real shame if someone fingerprinted you..." It's part of the reason why I get excited about toolkits like unity that remove the direct hardware interaction, but so far the limitations they impose always have come with serious costs as well.