HTML and CSS Reference
In-Depth Information
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.
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.