08-06-2010, 08:31 AM
08-06-2010, 11:02 AM
There are several ways to achieve the effect, I believe:
- A hidden < audio > tag will probably work, but since it's a HTML5 tag, the cross-browser compatibility is not so great right now.
The detailed methods can be found on Google, or some links given here:Code:IE 6/7/8 No support
Firefox 3.5.x - 3.6.x wav, ogg
Safari "Safari on the desktop supports any media the installed version of QuickTime can play", they said, thus H.264, MP3, AAC, and WAV should work, but ogg may not work.
Chromium/Chrome ogg, wav, mp3, aac
Opera ogg, wav (On Linux, Opera supports the formats GStreamer does)
http://net.tutsplus.com/tutorials/html-c...o-element/
http://dev.opera.com/articles/view/every...and-audio/
http://developer.apple.com/safari/librar...asics.html
- Flash. It works on most cases, provided that the user did not intentionally block Flash, and does have Flash installed. There are a lot of Flash audio players available, for instance: (Keep in mind that I cannot guarantee these things are safe!)
http://www.longtailvideo.com/players/jw-flv-player/
http://musicplayer.sourceforge.net/
http://flowplayer.org/
(And you can hide a Flash player easily.)
- There are also cases of video relying on other plugins, e.g. Windows Media Plugin. Of course, this is usually a bad idea.
08-06-2010, 11:36 AM
me too
as I'm listening my own music in my mp3 player
as I'm listening my own music in my mp3 player
08-06-2010, 11:23 PM
IE9 will support it, but only play MP3 and AAC, not WAV, which is weird, as it's a Microsoft-IBM developed format.
By the way, you can stack multiple sources inside the audio tag, so that if one format is incompatible, it will automatically go on to the next format, and play it if possible:
By the way, you can stack multiple sources inside the audio tag, so that if one format is incompatible, it will automatically go on to the next format, and play it if possible:
Code:
<audio controls autobuffer>
<source src="elvis.ogg" />
<source src="elvis.mp3" />
<!-- now include flash fall back -->
</audio>
08-07-2010, 03:21 AM
(08-06-2010, 11:02 AM)RichardGv Wrote: [ -> ]Last but not least, it's usually not a good idea to play audio automatically on a webpage without a way to let user stop it manually. :) And playing music in the background is annoying in viewpoints of some people, like me.
Seriously, a lot of people are browsing the internet at night while the rest of the people are asleep, autoplaying is annoying, autoplaying + hidden is awful!
08-07-2010, 10:52 PM
(08-06-2010, 11:23 PM)Vanilla Wrote: [ -> ]IE9 will support it, but only play MP3 and AAC, not WAV, which is weird, as it's a Microsoft-IBM developed format.
By the way, you can stack multiple sources inside the audio tag, so that if one format is incompatible, it will automatically go on to the next format, and play it if possible:
Code:<audio controls autobuffer>
<source src="elvis.ogg" />
<source src="elvis.mp3" />
<!-- now include flash fall back -->
</audio>
Thanks all for the help butt this 1 works
(08-07-2010, 03:21 AM)HiddenKnowledge Wrote: [ -> ](08-06-2010, 11:02 AM)RichardGv Wrote: [ -> ]Last but not least, it's usually not a good idea to play audio automatically on a webpage without a way to let user stop it manually. :) And playing music in the background is annoying in viewpoints of some people, like me.
Seriously, a lot of people are browsing the internet at night while the rest of the people are asleep, autoplaying is annoying, autoplaying + hidden is awful!
u really think that hk i was thinking on like a 20 second intro thingy
08-08-2010, 06:24 AM
(08-07-2010, 10:52 PM)CrazySp4ce Wrote: [ -> ]Yes, I will kill you if you don't allow people to shut it off. :P(08-07-2010, 03:21 AM)HiddenKnowledge Wrote: [ -> ](08-06-2010, 11:02 AM)RichardGv Wrote: [ -> ]Last but not least, it's usually not a good idea to play audio automatically on a webpage without a way to let user stop it manually. :) And playing music in the background is annoying in viewpoints of some people, like me.
Seriously, a lot of people are browsing the internet at night while the rest of the people are asleep, autoplaying is annoying, autoplaying + hidden is awful!
u really think that hk i was thinking on like a 20 second intro thingy