|
|
|
|
|
by graue
4623 days ago
|
|
Ugh, why do people do that to begin with? :( I've had Web Audio for a while since I'm on the Aurora channel, and there's so many demos that refuse to work for no reason. I try to do my part by submitting pull requests that fix it, when possible, but most of those pull requests have been sitting ignored for months. Clearly more people need to be educated that user-agent sniffing = bad. |
|
Feature detection simply doesn't work it many cases, and there's no alternative. Especially with new stuff like audio, sometimes function calls need to be called in different orders, have subtly different behaviors, etc., and user-agent sniffing is literally the only thing you can do.
When I programmed an HTML5 music player, calling .load() before .play() on one platform was necessary, and on another it would crash the Android browser IIRC. No choice but to use user-agent sniffing -- I probably had 20 different things that depended not just on the browser, but on the browser version.
I'd love if we could use just feature detection. Unfortunately, we have to program in the real world.