HTML and CSS Reference
In-Depth Information
<p>This demo plays a one second tone when you click the button
below.</p>
<button onclick="playTone();">Play</button>
</body>
</html>
Though the result is simple, consider the capability this API provides: the ability to not only
play audio files without having to use a plug-in, but also to generate audio. Game developers
in particular should be interested in this capability.
As I mentioned earlier, there is no specification work underway for the Audio Data API, most
likely because the work on the concept is still very new. Apple and Google are also exploring
an audio data API via work in WebKit, called the Web Audio API. Google did propose the
formation of a W3C Audio Group, but none has been created at this time.
Do check out the APIs and the many excellent examples, but remain cautious about using the
APIs in your production efforts.
NOTE
The Audio Data API MozillaWiki entry can be found at https://wiki.mozilla.org/Audio_Data_API .
Mozilla has also provided an introduction to the API at https://developer.mozilla.org/en/Introdu-
cing_the_Audio_API_Extension . The BBC has also provided an excellent tutorial/introduction to
the Audio Data API at http://www.bbc.co.uk/blogs/researchanddevelopment/2010/11/mozilla-audio-
data-api.shtml . Access more information on the Web Audio API at http://chromium.googlecode.com/
svn/trunk/samples/audio/index.html .
Search WWH ::




Custom Search