Last week I introduced some of the problems and solutions
for those of you that wish to add multi-media content to
your web site. If you did not have a chance to read the
article, it is posted at: issue47top1.htm
Despite my own warning about the problems you may face when
adding multi-media files to your web site, I fell into the
trap of adding a link that was bound to fail even though I
suggested that it would work for most of you. If you try the
link from a Windows platform to the 315 kb avi file http://www.imswebtips.com/slogo.avi , you will probably see
the Windows Multi-Media player displayed followed by a
message that the file format is invalid. If however, you try
exactly the same file from: http://www.virtualmechanics.com/images/slogo.avi there is a
good chance it will play after it has finished downloading.
So if these two files are identical, why does the multi-
media player report that one is corrupt?
The reason is the MIME type. The www.VirtualMechanics.com
web site is hosted on an NT server. The www.imswebtips.com
web site is hosted on an Apache UNIX server. Since ". avi"
files are a proprietary Microsoft video format, the NT
server has the MIME type setup. UNIX systems and system
administrators have little interest in supporting Microsoft
unless they are asked to. In all probability the people at
Pair Networks where the IMS Web Tips site is located, would
not have a problem setting up the MIME type for ".avi" files;
but only if asked.
Assuming you have verified that the MIME types are set up
for your host and that you have a link to a downloadable
player for those visitors that may not have them, how do you
actually add the multi-media file to your web page?
As I previously mentioned, the simplest solution is to add a
hyper link to the multi-media file that you wish to play. In
addition to loading the visitor's default media player for
the file type being used, this method has the advantage that
it gives the user the option of deciding if they wish to
play the file or not.
The other options are to use the BGSOUND, EMBED and OBJECT
tags. Although they are not as easy to use, these tags have
the advantage that they will provide you with more control
over the multi-media playback.
When adding music or audio to a web site, the most common
method is to use both the BGSOUND and EMBED tags.
The \ tag is only available in Internet Explorer but
it allows the Browser to play the audio directly without
having to use a plug-in. The full format is:
filepath is the location of the audio file. This can
either be a Wave or a Midi file.
Loop set the number of times the file should be
played. A value of -1 will loop the file