This is kind of an aside, but I have a question. Is the format of the W3C specification an actual value-add to ideas like this? I mean, if I look at http://www.w3.org/TR/webaudio/ my eyes kind of glaze over, whereas if I read something like http://json.org/ (to pick something at random) it is far more accessible. Heck, most of the RFCs I've read are more readable than the W3C formatted specs (and are often written in a human, witty way).
what's the advantage of using the web audio api for this over html5 audio elements? i don't think there's anything here that html5 audio elements can't do...
HTML5 audio is missing many basic features! Like panning. If you make a game, HTML5 audio does not cut it. The Web Audio API is amazing in comparison, with full support for audio routing graphs with processing nodes, filters etc. set up how you want for a maximum efficiently low-memory low-latency audio system. HTML5 audio is like a big tape player that you can press "play", "pause", "stop" and if you're lucky maybe slow it down or speed it up and that's it. They're worlds apart.
This seems to be true, but I never understood why. HTML5 Audio is the simpler API; browsers vendors should be able to optimize it much more, yet, it still performs as bad as it did 2 years ago[1].
Another interesting fact is that iOS supports WebAudio, but doesn't support HTML5 Audio (for a meaningful definition of "support"). I just don't get it.
Yup, that's totally correct and sadly not much has changed since that blogpost. I still have several bugs filed on HTML5 Audio on chrome that have received no attention, that cause problems in BananaBread,
I suppose their assumption is that everyone should use Web Audio and forget about HTML5 Audio? It's sad though because Web Audio is total overkill for many things.
I didn't have played with WebAudio yet, but I assume that the main problem of HTML5 <audio/> is that the controls cannot be customized to fit the stylesheet. Using WebAudio probably allows to use custom html structure.
So the main question is : when will we have a standard shadow dom styling ? :(
You can do any customization with <audio/> that you can with Web Audio. The element doesn't have to be in the DOM to play audio.
It's actually harder to provide custom UI for the Web Audio API since seeking and general stream navigation are a complete afterthought and their API makes them a pain.
interesting. i haven't messed around with web audio in about a year and wasn't aware that this was now the case. my googling failed to turn anything up so i'd be interested in reading anything you might be able to link me to about this.
also, since you say "for starters" i'm curious what your other reasons are.
Thanks... That fixed it. However maybe you should detect if the mute switch is on and display a message. I'm guessing a lot of others would not think of that.
> Thanks... That fixed it. However maybe you should detect if the mute switch is on and display a message. I'm guessing a lot of others would not think of that.
Nice work though