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 kbavi 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 web site is hosted on anNT server. The 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 theBGSOUND, 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 theBGSOUND and EMBED tags.
The <BGSOUND> 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: <BGSOUND src="filepath", loop="1">
filepath is the location of the audio file. This can either be a Wave or a Midi file.
The <EMBED> tag is used by Netscape to load a Plug-In to play the audio file. The full format is:
When adding audio you should use both the EMBED andBGSOUND tags to ensure your audio will play in both major browsers.
The <OBJECT> tag is a new HTML 4 standard tag that will replace the EMBED and many other tags. It has many uses including adding Flash files to your web site. The tag is not yet fully supported across all browsers and consequently should be used in conjunction with the EMBED tag. Due to its extensive number of features and uses, its full description is probably best left for a future article. In the mean time you can look at theW3C's specifications at: www.w3.org
In addition to downloading a multimedia file to play on your machine through the Browser or Plug-In, you can also use Streaming Media. Most multi media files will have to be completely downloaded before they can be played. Since these files can often be huge, the visitor may have to wait a long time before the file starts to play even if they have a fast connection. Streaming media however, will start to play almost immediately. The files may still be huge, but the player does not need to wait until the entire file has downloaded.
Although Streaming Media's ability to play before the file has downloaded is a real advantage, Streaming Media is more problematic to set up. First, you will need a Streaming Server. Not allISP's include Streaming Servers and those that do may have restrictions or additional costs associated with its use. If a Streaming Server is available, you will need to transfer your Streaming Media files to the server as well as a RAM metafile that contains the paths to these files. Check with your ISP to find out exactly what you need to do to utilize their Streaming Server.
For most web sites, multi-media should be used sparingly. Although it may add interesting and valuable content, multi-media is generally a bandwidth hog. Visitors with slow connections may simply not be willing to wait. Visitors withMetallica playing gently in the background may not appreciate your web site blaring out "Twinkle Twinkle Little Star" to interrupt their peaceful web experience.
I have discussed some of the problems you may encounter when playing multi-media files and the tags that you will need to add to your web page. But how do you create the multi media file and just what are all those file types? MIDI, WAVE,MPEG, AVI, AU, RA, MOV etc. What is the difference and which ones should you use? -Next week
"IMS Web Tips" is a weekly news letter for all web site managers regardless of experience who are looking for detailed information on creating, maintaining and promoting their web sites.
To subscribe send anemail to email@example.com or visit www.IMSWebTips.com for subscription information and a list of past articles.
If you like the contents of this newsletter, please recommend it to a friend. Not only will you help us to continue to provide you with useful and informative articles, you could also win $10,000. Click here for details.