October 29th, 2013
The Web has been evolving at a fantastic rate over the last few years with the help of Mozilla pioneered technologies such as WebGL, asm.js and Emscripten. With all these improvements to speed and capability, more potential has been added to HTML5 that allows the Web to include amazing experiences previously only possible with the help of plug-ins. As impressive as these advancements have been up until now, HTML5 was missing a vital component for games developers, advanced audio capabilities supported across multiple browsers.
Today, Mozilla introduces Web Audio API as part of the update to Firefox for Windows, Mac, and Linux. This represents a substantial upgrade to the Web’s ability to process audio. Although the Web has had some audio support, this new Web Audio API brings some powerful new capabilities not possible with Audio Data API. Audio engineers can now build robust audio engines capable of outputting amazing soundscapes for people to enjoy. A few new features to highlight include positional audio and support for effects such as reverb, which can create immersive audio experiences on the Web, like never before.
The release of the Web Audio API provides the final building block needed to run advanced games on the Web. Games like the recently released Epic Games demo, Citadel which offers a great demonstration of what is now possible. Try it out on Firefox and you’ll notice an immersive surround sound experience when walking down a street or past waterfalls.
We’ve received a lot of feedback about Web Audio API and believe we now have an offering games developers will love. To help showcase exactly what it can do, we have been collaborating with Goo Technologies who have built an open source demo to show some of these capabilities in action. This demo was built using their suite of game development tools which they will be releasing next week.
For a developer overview of how Goo Technologies implemented the Web Audio API, take a look at this Hacks post, which includes a link to the interactive demo.
Firefox supports Ogg (both vorbis and Opus) and includes conditional support for MPEG 4, H.264, MP3 and AAC. The support for this later group is not built directly into Firefox, instead it relies on support from the OS or hardware.
Firefox has implemented the Web Audio API as described in this W3C standard. It has been largely agreed on by the browser community and is very similar to the prototype Webkit Web Audio API, but with a number of improvements. Until other browsers upgrade their implementations, we need to make sure that these differences are clear. To make supporting the legacy and the standard version as easy as possible, we have written an article that covers the differences and how to write code that will work for both.
The Firefox team is excited to be the first browser to bring the standards compliant version of Web Audio API to the Web. Now the Web offers a truly competitive platform for games developers, we can’t wait to see what people do with it!
– Martin Best, Game Platform Strategist, Mozilla