HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings

Web Stuff | Audio | Basics | Browser | Code Tips | Design | Fonts | Forms | Frames (Page 1), (Page 2) | Images (Page 1), (Page 2) | Links | Random | Redirection | Sound | Video | Search Engines | Lycos UK | Home Server (Page 1), (Page 2), (Page 3)

When copying the code from these pages remember to paste them first into a text only editor such as Notepad and then copy and paste from there into your webpage. This is so that all the text formatting codes can be removed from the copied text. Remember that your HTML editor must be in code or HTML view when you paste the code into it. If you are using a template driven HTML editor then the code must be pasted into an HTML and not a text box. JavaScript must be enabled in your browser for the effects generated by it to be seen.

Sound Video

Play background sound / music

Play a background sound / music file uninterrupted across several pages - HTML

Reducing audio file load times

What file types are supported?

Play a video file - HTML

Sound:

Play a background sound / music file - HTML

This is done by adding the following HTML to the page

<EMBED src="pomp.mid" width="350" height="55">
<noembed>Your browser can't read the musical background of this page</noembed>

Your browser can&#39;t read the musical background of this page  

Another method is to add the following code in the <head> section of your page

<bgsound src="*****.***" loop="infinite">

In both cases replace *****.*** with the name, and if necessary, the path to your music file.

One of the best tutorials I've found on the Internet for embedding sounds on web pages is at Web Reference

Another good site specifically for QuickTime is at Apple's site

Free midi files can be found at :-

http://spockfu.freeyellow.com/midihome.html
http://www.partnersinrhyme.com/pirsounds/WEB_DESIGN_SOUNDS_WAV/MIDI.shtml
http://www2.ocn.ne.jp/~kudos/midsound.html
http://www.dock.net/ira/classical.html
http://www.crln.com/us/eamonn/midicol.htm
http://www.elbacom.it/sounds/

Play a background sound / music file uninterrupted across several pages - HTML

This is done by creating a small frame on your site. The frame stays constant and the code to play the sound file is placed in this frame.

Reducing audio file load times

Remember - not everyone uses T1 connections to the internet! There are ways to reduce the size of an audio file so that it will download faster on the web:-

Length of the audio clip. You should keep the audio sample as short as possible or use just part of a song.

Number of channels. A mono audio file requires half the disk space of a stereo file.

Bit depth. Audio files for the web are most often saved at 8-bit instead of 16-bit files.

Sampling rate. Cutting the sampling rate in half will cut the file size in half. Audio files that are voice only can be reduced down to 8Khz. Music will sound acceptable at 22 Khz.

There are two audio formats for the web: Non-Streaming and Streaming

Non-streaming Audio files must be downloaded from a web server in their entirety before they can begin playing on your computer.

Streaming Audio files begin playing almost immediately as they are downloaded from the server. Streaming audio formats are those like Real Audio. However, your web server must support it for it to work.

What file types are supported?

Most popular file types are supported. Whether or not your visitor can play them depends on whether they have a player for that file type, so I would stick to the most popular .MID, .MP3 etc. as most people have a player that can handle these.

Video:

Play a video file - HTML

This file is played using the following code

<EMBED src="dodo.mpg" height="400" width="400">
<noembed>Your browser can't read the video file.</noembed>

Your browser can&#39;t read the video file.

The file below is played using the following code

<EMBED src="bad_day.mpeg" height="250" width="200">
<noembed>Your browser can't read the video file.</noembed>

Your browser can&#39;t read the video file.

Web Stuff | Audio | Basics | Browser | Code Tips | Design | Fonts | Forms | Frames (Page 1), (Page 2) | Images (Page 1), (Page 2) | Links | Random | Redirection | Sound | Video | Search Engines | Lycos UK | Home Server (Page 1), (Page 2), (Page 3)

HomePage | Optical Illusions | War Stories | QBasic | Dads Navy Days | Bristol | Bristol, USA | Bristol, Canada | Terre Haute | Miscellany | Web Stuff | About Ray | Site Map | Site Search | Messages | Credits | Links | Web Rings

This page created 28th November 2003, last modified 28th December 2004


GoStats stats counter