Fli
05-22-2014, 09:50 PM
Hi,
do you have good tips on how to auto play music or some sound after a webpage is opened?
So far i found this code to be working good:
for mp3
<audio autoplay>
<source src="song.mp3" type="audio/mpeg">
</audio>
for ogg
<audio autoplay>
<source src="song.ogg" type="audio/ogg">
</audio>
just add to a webpage code. make sure audio file is in same folder as webpage file, you can also set path like /sounds/song.mp3 ---> source src="/sounds/song.mp3" and that means you need to add your song into yourdomain.com/sounds/ folder.
Example auto play sound you can find at website: http://hostinghostgatorcoupons.com/
The voice is created by: http://www.ivona.com/en/ (speaker is: Joey)
I just let him speak it and being recording by audio recorder software.
do you have good tips on how to auto play music or some sound after a webpage is opened?
So far i found this code to be working good:
for mp3
<audio autoplay>
<source src="song.mp3" type="audio/mpeg">
</audio>
for ogg
<audio autoplay>
<source src="song.ogg" type="audio/ogg">
</audio>
just add to a webpage code. make sure audio file is in same folder as webpage file, you can also set path like /sounds/song.mp3 ---> source src="/sounds/song.mp3" and that means you need to add your song into yourdomain.com/sounds/ folder.
Example auto play sound you can find at website: http://hostinghostgatorcoupons.com/
The voice is created by: http://www.ivona.com/en/ (speaker is: Joey)
I just let him speak it and being recording by audio recorder software.