Here is a page where we test various ways to embed audio files into a web page. On this page I'll test all major formats by wrapping <object>
tag sets around an <embed>
element. This should work for all major browsers, including IE.
Bare Link
First off, we can just put up a bare link.
- The famous Summertime Blues, albeit not by Eddy Cochran. This is in .mp3 format
- The not-so-famous Marechal Ferrant, which comes from the little-known French Songs from the Loo collection. This is in .wav format.
- A nice hymn, Lord For Thy Tender Mercys Sake by S. S. Wesley. This is in .midi format.
- Back to Summertime Blues. This time it is in .wma format.
- And once again, Summertime Blues, this time in .ogg format.
Wrapping <object>
around <embed>
I think, but I'm not sure, that tag wrapping only works if one combines with conditional comments. It seems that IE will see the object tag and try to create space for it. But it won't then play anything because the empyt space created for the object tag covers up the embed tag. I'm not sure. This approach should work in IE6, but it doesn't appear to be at the moment.
- Summertime Blues in .mp3 format
- Marechal Ferrant in .wav format
- Lord, For Thy Tender Mercy's Sake in .midi format
- Sumertime Blues in .wma format
- .ogg format
- Only works reliably in
<audio>
, and then only for some browsers. No use in testing it with the nested approach used here.