TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The State of HTML5 Audio

109 pointsby sant0sk1about 14 years ago

13 comments

dsteinabout 14 years ago
<p><pre><code> Mobile Safari Can't pre-load sound files, only plays one sound at a time, severe lag, timing issues, clicks &#38; pops, completely ignores every other call to play a sound, doesn't support Ogg/Vorbis. Utterly useless for anything. Oh, and did I mention it doesn't support Ogg/Vorbis?* </code></pre> More specifically Apple has crippled the Audio API by disabling the autoplay option, and disabling the JavaScript .play() function. This makes it completely impossible to build web games, or web apps that have any sort of audio feedback in Safari on any iOS device.<p>Presumably they've done this to prevent web games from becoming popular and eventually dethrone the App store.
评论 #2305865 未加载
评论 #2307809 未加载
评论 #2305855 未加载
transmit101about 14 years ago
A lot of discussion about the demise of Flash is focused on how CSS and JavaScript can now create equally pretty-looking websites, which is fair enough. But take it from a long-time audio developer: HTML5 audio is essentially useless for creating web applications involving almost any kind of audio. Even Firefox, which has the best HTML5 support so far, offers absolutely nothing like what is possible using the combination of a Flash client and a dedicated streaming server.<p>Flash might have a lot of bad points (which I'd be the first to call out) but RTMP audio (which also handles both video and arbitrary data) really isn't its worst feature, and for this reason alone its going to be a significant part of the internet for many years to come.
评论 #2306015 未加载
评论 #2307342 未加载
mckossabout 14 years ago
<i>I don't give a shit anymore about this stupid piece of crap that Microsoft calls a Browser and throws out a release for every 3 years, just in time to not let it fade out completely but annoy web developers for more years to come.</i><p>I can relate to this feeling.
gmacabout 14 years ago
In summary: "there's some profanity ahead because HTML5 Audio is still that fucked up".<p>My experience is entirely aligned. I was trying to use &#60;audio&#62; earlier this week for an incredibly simple task (occasionally play a 0.5s notification sound).<p>The only thing that worked reliably was Chrome (9) with a data: URI. FF3.6 (or Chrome with a normal URI) would only play the sound once, and Safari wouldn't play it at all. (These are all the Mac versions, and I didn't test Opera).
asuthabout 14 years ago
We've been using SoundManager 2 on quizlet.com for playing audio clips. We're not just playing long music clips in the background, so it's essential to have all the precise APIs for preloading, playing, and firing callbacks when sound is done playing. It handles all the browser deficiencies very elegantly, either with HTML5 or flash. Also, it's just 10k of js (gzipped) so it's pretty lightweight.<p>link: <a href="http://www.schillmania.com/projects/soundmanager2/" rel="nofollow">http://www.schillmania.com/projects/soundmanager2/</a>
评论 #2307403 未加载
mithalerabout 14 years ago
Contrary to his claims, his test case seems to work mostly fine in Chrome 10.0.648.127 (beta) for me. I haven't tried the dev channel version though. Firefox doesn't appear to be working well at all, in either 3.6.16pre or 4.0b13 (but those are both unstable versions, so I'll withhold judgment). All of those were tested on Ubuntu.<p>Regardless, he's definitely made his point well (and my setup showing different but similarly bad results from his only proves his point): support for the &#60;audio&#62; tag is not really as solved as browser manufacturers are claiming, and is not currently a suitable competitor to Flash.<p>Direct link to test: <a href="http://www.phoboslab.org/files/html5audio/" rel="nofollow">http://www.phoboslab.org/files/html5audio/</a>
slugabout 14 years ago
Has anyone managed to make the audio tag work reliably with streaming? icecast server with ogg vorbis stream comes to mind. Tried konqueror (works), firefox 3.6 (doesn't work properly), chrome 9.x (doesn't work properly).
评论 #2306628 未加载
mambodogabout 14 years ago
I hope for the day when the Webkit Web Audio API[1] or something like it is widely available so we can build rich audio apps like Audiotool[2] without relying on Flash.<p>[1] <a href="http://chromium.googlecode.com/svn/trunk/samples/audio/index.html" rel="nofollow">http://chromium.googlecode.com/svn/trunk/samples/audio/index...</a><p>[2] <a href="http://audiotool.com/app" rel="nofollow">http://audiotool.com/app</a> [SWF]
tzsabout 14 years ago
Ogg/Vorbis works just fine in Safari on my Macs. That's because Safari as far as I can tell is neutral when it comes to audio--it plays whatever you have Quicktime support for and I have installed Ogg/Vorbis.
johnyzeeabout 14 years ago
How do you have &#60;audio&#62; working in the Android browser? Last I checked (2.2) the tag was supported but there was no format support (kind of like an airplane without wings). This was filed as a defect in June 2010 and a fix was promised, but not delivered for Android 2.2:<p><a href="http://code.google.com/p/android/issues/detail?id=9372" rel="nofollow">http://code.google.com/p/android/issues/detail?id=9372</a>
neoviveabout 14 years ago
Could applications such as PhoneGap be used to fill the void regarding audio on mobile devices? It's a shame that as the profits of app stores continue to rise, there is less motivation to promote and expand open standards.
评论 #2306429 未加载
MatthewPhillipsabout 14 years ago
I coded a Chrome Web App and can sympathize. I eventually had to entirely recode my app because the first go was crashing the tab randomly when audio was playing. I can't imagine trying to do short sounds like in games.
peregrineabout 14 years ago
My question is, just like in socket.io, why not fall back to flash audio when required?
评论 #2305684 未加载
评论 #2306282 未加载