Embedding Multimedia

Embedding Sound in a Web Page
The basic tag for embedding a sound on a web page is this:

<embed src="parts/final.mid" />

The above code will make this.

The <embed> tag can have several attributes to it.
alt="....." Provides information that will appear when you hover over the object.
border="....." makes a border around the object. The border should be a value like "1" or "0".
hidden="....." This can = true or false. If true, then the above media player will be hidden from the viewer. The attribute is false by default.
autostart="....." This can = true or false. If true, then media player will play automatically. The attribute is true by default.
loop="....." This can be true or false. True means that it will play over and over. False is the default.

A sample <embed> tag with some of these attributes:

<embed src="parts/final.mid" alt="music!" border="4" hidden="true" loop="true" />

Common media file types for the web include: .wav, .au, .mpeg, .mid, .eps, and .vrml.

Don't bother embedding a file that is over 100 K in size on your web page. The load time might be longer then most are willing to wait.

Embedding Video in a Web Page
This is done the same way as above.

<embed src="parts/lizardking.avi" />

Which makes this.

You can also use the same attributes.

The <noembed> Tag
Not everyone will be able to watch/listen to your file. For these people you will have to provide a <noembed> tag followed by a </noembed> tag. Usually you place a link to the file as an alternative.

Example:

<embed src="video.avi" />
<noembed>
<a href="myvideo.avi">See my video</a>
</noembed>

Those who can see your file will not see this alternative text/link.

Main?