song will start automatically, replay when it reaches the end, and display the default browser audio controls. Here is the code to embed song1:
NOTE
Just as we did with video, we have placed the audio type with the broadest support for iOS devices first in the list. This is because handheld devices do not do well with multiple embedded sources.
We created .ogg, .wav, and .mp3 versions of the song using Audacity. Example 7-2 gives the full code.
Example 7-2. Basic HTML5 audio revisited
CH7EX2: Basic HTML5 Audio Revisited
NOTE
song1 was created 10 years ago using Sonic Foundry’s Acid music-looping software. Acid is an amazing tool for creating soundtracks because it can help even the musically inept (read: us) create songs that sound perfect for games and applications. Acid is now sold by Sony for Windows only. Songs can be created on the Mac in a similar way using GarageBand.