Objects: Audio (§13.3)

<object> could also be used for audio clips. Having a visual rendering is not a requirement, since not all Web browsers are visual. As images are to graphical Web browsers, audio clips are to speechreaders.

Your Web browser may require you to download and install plugins to play the following.

MIDI

Many plugins support MIDI using the generally accepted content type audio/x-midi.

Some websites incorrectly use the invalid content type audio/midi, which has not yet been registered. However, a draft registration is under development.

Example:

If your Web browser cannot play this classical music, it should present a link to download it.

<object data="/audio/pachelbel.mid" type="audio/x-midi">
<p>Listen to <a href="/audio/pachelbel.mid" type="audio/x-midi">Pachelbel&rsquo;s Canon in D</a> (MIDI</acronym>, 10 <abbr title="kibibytes">KiB</abbr>).</p>
</object>

Your Web browser renders it like this:

Listen to Pachelbel’s Canon in D (MIDI, 10 KiB).

Ogg Vorbis

Ogg Vorbis is an open, cross‐platform, patent‐free audio format.

Ogg Vorbis uses the Ogg container file format, which may contain other multimedia, like Ogg Theora video.

Example:

If your Web browser cannot play this sample of a song by Piero Umiliani, it should present a link to download it.

<object data="/audio/mahnamahna.ogg" type="application/ogg">
<p>Listen to <a href="/audio/mahnamahna.ogg" type="application/ogg">Mah Na&rsquo; Mah Na&rsquo;</a> (Ogg Vorbis, 864 <abbr title="kibibytes">KiB</abbr>).</p>
</object>

Your Web browser renders it like this:

Listen to a sample of Mah Na’ Mah Na’ (Ogg Vorbis, 864 KiB).