Skip to main content

ADDING SOUND INTO A WEB PAGE

There are two tags for adding sound to your document, Internet Explorer 3.0's <BGSOUND> tag and Netscape's <EMBED> tag. The <BGSOUND> play the background sound from your page. That is when visitor visit your page, the sound will automatically play. Netscape's <EMBED> tag is slightly different, you can use its attribute to select playing sound when the page is loaded or give the users an option to click whether they would like to hear the sound.

HERE IS HOW TO USE AN <EMBED> TAG:

<EMBED SRC=your_file.mid AUTOSTART=true WIDTH=144 HEIGHT=60 LOOP=1>


AUTOSTART=true means automatically play sound when document is loaded. This way, the sound will play as a background sound. You can also set the value to false. The sound will play when the "play" button is clicked.

LOOP=n This tells browser how many times to play sound. n could be an integer, true, or false. Setting LOOP=true, browser will continue playing your sound until the stop button on the console is clicked.

WIDTH and HEIGHT This is how the sound control (console) will be displayed. Setting them as the given numbers, browsers will display a full console. Setting the width=0 and height=2, the console will not displayed by the browsers. Other values that too small will cause the browsers display uncompleted image. You might also hide it by placing HIDDEN=true like this: <EMBED SRC=your_file.mid AUTOSTART=true HIDDEN=true LOOP=1>

It's a good idea to give an alternative to people who using browsers that do not support the embedded sound. Here is what I did on this page:

<embed src="bgsound.mid" hidden="true" autostart="true" loop="1">
<noembed>Your browser doesn't support EMBED, but you can still listen to the background sound of this page by<a href="bgsound.mid"> clicking here.</a></noembed>

Browsers that do not support EMBED will display the link inside <noembed> tag.

Here is how to use <BGSOUND> tag:

<BGSOUND SRC=your_file.mid LOOP=1>

LOOP can be specified as any positive number, infinite, or -1 which equals infinite.

NOW, I WOULD LIKE TO TELL YOU SOMETHING.

The differences of two browsers brought headaches to us. I would like to correct what I described here in last version of this page. You'd better use both <EMBED> and <BGSOUND> tags to make sure that visitors get background sound.

Internet Explorer does not support <EMBED> tag directly, but it does support plugins that installed by Netscape. The users of Internet Explorer 3.0 or higher will hear the sound from <EMBED> if they also have Netscape 3.0 installed in their machine. In this case, If there are both tags in the documents, Explorer take <BGSOUND> tag active but will report the error of cannot playing sound that resides in the <EMBED> tag. This is a disadvantage of putting both tags together.

-----------------------------------------------------
The error tag will be something like:

DEBUG
Unable to start midi
OK

Or

Midi Error
Unable to start playing midi sound
OK
-----------------------------------------------------

Anyway, these boxes are not a big deal, users can click "OK" to process to the next step. I recommend using both tags to make sure that your visitors will surely hear background sound. If you're planning for giving the option for users to click from the sound console to hear sound, you only have one alternative -- using <EMBED> tag.

TIPS FOR PEOPLE WHO INSTALLED NETSCAPE 4.0 ON THE MACHINE THAT HAVE INTERNET EXPLORER INSTALLED:

Netscape 4.0 will disable your plugins installed by its previous version. If you have IE installed in your system, IE will no longer be able to play midi file (in case that IE shared plugins with Netscape). You'd better back up the plugins previously installed by Netscape 3.0 and copy them back to plugins directory. If you have IE installed, you can use those files in IE's plugins directory.

WHAT FILE FORMATS CAN I INCLUDE IN MY PAGES?
The <EMBED> tag plays audio files in WAV, AIFF, AU, and MIDI formats.

1. MIDI (.mid) format give you a high quality of digital sound.
2. WAV (.wav) format was developed for used with Microsoft's Window. You can record .wav using Windows. The sound quality is not as good as MIDI, but the file is smaller.
3. AU (.au) was developed by Sun. The sound quality is poor, but the file is quite small, used for recording short speech.
4. AIFF (.aiff) was developed by Apple for music and high quality sound.
The most popular is MIDI for music and WAV for short message. If you own a PC running Windows, you are ready to plug a microphone and start recording.

For Website Designing and Development
web designing in hyderabad
eMail : varadesigns@yahoo.com
phone : +91 9247457705

Source : http://www.tips-tricks.com/sound.asp

Popular posts from this blog

Search Engine Optimization – How to Get the Best Rankings

Effective search engine optimization is absolutely crucial for any website proprietor that likes to boost their traffic. No issue how many promotion you location on other websites and in the press the best way to get a bigger number of exclusive tourists is through search engine rankings and online directories.The idea behind seo edinburgh is to make your world broad web falls as appealing as likely to the engine crawlers. You may have a attractively conceived website that comprises unbelievable images and a flawless layout for reading but this solely will not advance your search rankings, there are other components that are important.If you believe of the times when you use one of the foremost search engines you should inquire yourself how many distinct falls do you actually gaze through? It is rather uncommon for any individual to get to the fourth of fifth falls of the results. For creative search engine optimisation edinburgh your location desires to be on the very first page.There...

10 Tips on designing a fast loading web site

Seems to me like most web users (me included) are always in a hurry when browsing. Statistics show that, without a compelling reason, the average user will not wait for much more than 10 seconds for a page to load. So does that explain why your visitors seem to spend less than 5 seconds in your site? Probably your site is taking too long to load thus putting off visitors. As you design your site, loading time should always be a priority if your site is to be an effective business tool. Balancing usability and aesthetics is a delicate matter when creating a fast loading site. You can have a colourful website but takes ages to load while on the other hand you can design a simple site that loads faster than you can brink. Below are 10 tips and tricks that I have found very useful that you can use while designing your fast loading website. Read more: http://www.site-reference.com/articles/Website-Development/10-tips-to-creating-fast-loading-websites.html#ixzz0pmGVZEk6 1. Use images sparing...

VISIBONE HTML AND COLOR POPUPS

These handy popups by VisiBone will open a separate window to the left side of your screen for quick reference and will get out of your way and hide as soon as you click on another window screen, ready for when you need it next. Use these popups online, or download the Desktop Popup zip file below to use them offline. Big thanks to VisiBone for this wonderful free service mirrored here (with permission) for your convenience. We wholeheartedly recommends VisiBone's exceptional tools, well known in the design community . HTML Popup The HTML Popup by VisiBone is a tall skinny on-screen quick reference showing all HTML tags and attributes in use or universal. Included: color-coded indications of support by Netscape®, Microsoft® Internet Explorer and W3C®, style sheet alternatives, and bug and clash icons with details online. Read AT : http://websitetips.com/visibone/