How To Play A Sound Of MP3 File When Page Finish Loading
- Forums
- HTML
- How To Play A Sound Of MP3 File When Page Finish Loading
do you want to know how to play a sound when a web page loads automatically? if so, i will show you how you can do this. [764], Last Updated: Sat May 18, 2024
wallpaperama
Tue Feb 15, 2011
0 Comments
1391 Visits
playing a sound is very easy. all you have to do is use the <embed> tag to start playing a sound or a mp3 or wav file as soon as the page loads
its very easy, lets say i have a sound i want to play when a user visits one of my web sites, all i have to do is use this HTML code like this:
<embed src="http://www.example.com/sounds/piano.wav" autostart="true" hidden="true" loop="true"></embed>
thats all
now it gets more complicate with browser compatability. so far i have tested this on firefox and internet explorer
on internet explorer it works find by using windows media player
but on firefox, the user will have to install the plugin for it to work
you can get more creative also by using javascript if you like. another option is to use flash, flash is a way better plugin for this type of function, if you are not familiar with flash, you should start learning. it can do alot of things like this.