One of the primary goals of the new CPR.org website was creating a great, seamless media experience. Part of this was the creation of a persistent audio player that worked on as many modern browsers and devices as possible. Creating this experience, though, was a bit of a process. The audio landscape is pretty scattered when you take a close look at HTML5 audio support and Flash support. So the first thing up was finding a library that let us use both types of audio to reach a wider audience.
alert()statements throughout your code. We now have inspectors, debuggers, and other tools that make things much easier. And you've probably encountered
console.logand the power of JS consoles. This can provide some good insight into what's going on with your code, but there is a catch.