Anyone know a good way to add sound to webpages? Like play songs and such. It dosent matter how, just as long as I will be able to understand how to do it.
First result in :google::
[url]http://www.2createawebsite.com/enhance/adding-music.html[/url]
Nowadays people use Flash music players though.
But you shouldn't add any sounds unless you have a damn good reason to since they're mostly annoying.
Use this HTML code:
<embed src="song.wav" hidden=true>
I know that works with .mp3 .wav and .mid. ;)
Forgot to mention that the hidden disables the "Windows Media Player" bar to show up and will play in the background.
If you want the player bar to be there then just take that out.
I usually use flash - it's a bit more overhead but adds in a LOT more flexibility. I actually have a small flash script that will play any media file set by an external file (no need for a flash editor or anything, just tweak settings and upload). PM me if you want a copy.
There are many ways to play music on a page, if you want only a single track you can use flash/embed and javascript.
For flash there are thousands of players hanging around but for the time being I'll point you to here: [url=http://flash-mp3-player.net/]Click[/url]
For embed though:
[code]<embed src="song.mp3" autoplay="false" hidden="false" width="100" height="100" cache="true">[/code]
This will create a 100x100 none autoplaying player in either wmp/quicktime or if you are using firefox, it's own replacement player and will be cached by your browser so it will load instantly next time it plays.
Sorry, you need to Log In to post a reply to this thread.