Example
<audio controls="controls" height="50px width="100px"><source src="song.mp3" type="audio/mpeg" />
<source src="song.ogg" type="audio/ogg" />
<embed height="50px width="100px" src="song.mp3" />
</audio> The example above uses 4 different audio formats. The HTML 5 <audio> element tries to play the video either as ogg or mp3. If this fails, the code "falls back" to try the <embed> element. If this also fails, it displays an error.
Problems:
- You must convert your videos to many different formats.
- The <audio> element does not validate in HTML 4 and XHTML.
- The <embed> element does not validate in HTML 4 and XHTML.
Comments
Post a Comment