In this chapter, we learned how to use the HTML5
audio element and API to add sounds to web applications. We saw how to load and cache audio files by creating a re-usable audio manager object. Then we used HTML5 audio to create a virtual piano application for playing the piano in a web page. We used keyboard events to allow the user to play the piano keys via the keyboard. We added controls to change the volume and sustain notes.
We covered the following concepts in this chapter:
<audio>element to a web page and use its attributes to control it