How to add sounds to your web site
.wav & .mid (midi) files
For Real Audio files
1.Copy your encoded files (files with the .ra, .ram, .rm or .rpm extension) to your World Wide Web server.
2.Use a text editor (such as Notepad or SimpleText) to create a metafile containing a URL to your file.
For example, the contents of your metafile should be in the following form:
where hostname is the name of your World Wide Web server. For example: www.real.com
3.Save your metafile as a text using a .ram file extension.
4.In your HTML document, reference the metafile in a hyperlink. For example:
<A HREF="filename.ram"> <A HREF="http://hostname/file.rm">
You can use relative or complete paths. If you use complete paths, you must include both the hostname and the complete path. For example:
5.When a user clicks on the link, the streaming file(s) begin to download. The RealPlayer begins playing after a few seconds; it does not need to wait for the entire file to be downloaded.
The src attribute supplies the URL of a sound file in WAV format, suitable for playing on a PC. The loop attribute provides the number of times to play the audio clip. You can specify any positive value or the word infinite, which causes the audio to loop until the user leaves the page.
Thus, you might put something like <bgsound src="your.wav" loop=infinite> in your document. As long as your document is being displayed, the audio is played. Netscape does not support the <bgsound> tag, but does support the <embed> tag.
You can use it to embed an audio object in your document, which Netscape will play for you. To embed an audio file and have it play in the background, use this tag: <embed src="your.wav" hidden=true autostart=true loop=true>
This tells Netscape to load the audio object but not display it to the user, to start playing when the page is loaded, and to loop the sound forever. If you set hidden to false, Netscape will present the user with a set of controls to manage the audio playback. Setting autostart to false will prevent the audio from playing until the user explicitly starts it. Finally, you can set loop to false to play the sound only once, or to a number for a specific number of loops.
PO Box 22157 Knoxville, Tennessee 37933-0157
Telephone: 865-692-9253 FAX: 865-692-9247
© 1998, 1999, 2000 PLANETWEBDESIGN
TECHNOLOGIES, Inc. All rights reserved