Howler.js v2.0 Released

Howler.js v2.0 Released
howlerjs.com

In early 2013, I set out on a journey to simplify browser audio for our then in-development HTML5 multiplayer game, CasinoRPG. It quickly became clear that this was a problem many in the development community faced, and howler.js evolved into much more than the simple helper it set out to be. Today it is used by the likes of Google, Disney, LEGO, NASA, DC, EA, Ubisoft, Paramount, Warner Bros, Universal and thousands of other developers all over the world.

Browser audio has come a long way since that weekend project got started, and so has our understanding of how to best utilize it. Using all of the knowledge gained by the incredible community howler.js has spawned and through our own development experiences, howler.js v2.0 has been completely rewritten from the ground up to be a truly all-in-one solution for browser audio (the API changes were kept as minimal as possible, and you can find the migration guide and changelog here.

New Structure

The same goals remain: audio in the browser should be simple and effective by defaulting to Web Audio API and falling back to HTML5 Audio (now only necessary in Internet Explorer for the most part). In addition, howler.js is now a modular library, allowing for a lean core that can be extended to add more advanced functionality such as the wealth of tools available as part of the broader Web Audio API (spatial audio, filters, etc). We are launching with a spatial audio plugin, but hope to add more with the help of the community in the future.

One of the pain points of 1.x was the confusion surrounding playback of multiple sounds, sprites, etc. This mainly came about because the original release was much simpler than what things evolved into. So, with all of this in mind, a 3-layer structure became an obvious solution.

You still have the global context with Howler, but now there's the idea of groups and single instances of audio. Each time you play a sound, it keeps track of its own state, inheriting from the Howl group. This allows you to more explicitly control both the group of sounds and the individual sounds, providing more intuitive and predictable results. This also allowed for the introduction of a whole host of new helper methods that can control one or many sounds, such as once, playing, duration, state, rate and more.

VIEW FULL CHANGELOG

New Website

In addition to re-writing the library, it became apparent that howler.js deserved to have a home of its own rather than living on this blog. The idea was to showcase the library and its uses in an easily digestible format on any device/platform (just like the library itself). Plus, it was a fantastic excuse to break out my design chops, which had been growing dusty by the day!

It isn't just a new website, but also a new logo as well. Lane Brown, our fantastic art director here at GoldFire Studios, put my 1.x attempt at a logo to shame with this new mark, bringing the howler monkey and his thumping headphones to life.

howlerjs.com

The site is very minimal: highlights of major features, various live demos and a showcase of sites/apps using howler.js. The website is also hosted open-source on GitHub, so I encourage contributions, especially if you've got a cool app that I missed!

Thank you to the dozens of contributors who helped make this release a reality! The open-source community is something quite remarkable, and we continue to be excited to be a small piece of it.