Hacker News new | ask | show | jobs
by hurtuvac78 1322 days ago
Yes, but it is frustrating to limit yourselves and your users because Safari or Firefox does not support some Canvas features, some voice recognition ones, bluetooth or localhost interactions for example.

I really don't like the idea and the practice of helping a Google monopoly, and I am guilty of it at times. But on the other hand, using such features is a way to encourage Apple to upgrade their browser... which they have little incentive because they want apps.

3 comments

The problem with the Web Speech Recognition API is that for now it more or less requires either:

- including proprietary code (open source browsers are reluctant to do that (widevine is usually the only exception and it's opt in on Firefox and some Chromium forks)) (Google does this for other parts of Chrome at least, idk if it's used for WebSpeech or just live captions)

- interfacing with OS-provided proprietary code (doesn't exist on all platforms)

- streaming everything to a cloud server (likely prohibitively expensive unless you're Google) (Google does/did this too)

Safari not allowing requests to localhost from HTTPS is weird and I'm not sure why it's like that but it works fine in Firefox. Same for OffscreenCanvas which is the only canvas feature I've missed, Firefox finally added it 2 months ago.

Anyway, just don't block specific browsers, feature detect and if possible use a polyfill or ponyfill.

You don't need to limit yourself, just provide usable fallbacks. Most of the time, these missing features aren't critical to your app, so just disable them when not supported. What browser you use isn't a good indicator anyways, as a features are added often and various settings/extensions/policies can disable or cripple features even in browsers that normally support them.
I remember when we used to speak about IE in those terms.

How the world has changed.