HTML and CSS Reference
Playing a Sound with No Audio Tag
Now that we have a sound playing in an HTML5 page and we are tracking the properties of
the audio element on the canvas, it is time to step up their integration. The next step is to do
away with the <audio> tag embedded in the HTML page.
If you recall from Chapter 6 , we created a video element dynamically in the HTML page and
then used the canPlayType() method of the HTMLVideoElement object to figure out what
video file type to load for a particular browser. We will do something very similar for audio.