invisible sound on webpage?
08-06-2010, 11:02 AM, (This post was last modified: 08-06-2010, 11:07 AM by RichardGv.)
#2
RE: invisible sound on webpage?
There are several ways to achieve the effect, I believe:
  1. A hidden < audio > tag will probably work, but since it's a HTML5 tag, the cross-browser compatibility is not so great right now.
    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)
    The detailed methods can be found on Google, or some links given here:
    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
  2. 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.)
  3. There are also cases of video relying on other plugins, e.g. Windows Media Plugin. Of course, this is usually a bad idea.
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.
Gentoo Linux User (w/ fvwm) / Loyal Firefox User / Owner of a Stupid Old Computer - My PGP Public Key

No man is an island, entire of itself; every man is a piece of the continent, a part of the main; if a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friends or of thine own were; any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee.
-- Devotions Upon Emergent Occasions (1624), John Donn
Reply


Messages In This Thread
invisible sound on webpage? - by CrazySp4ce - 08-06-2010, 08:31 AM
RE: invisible sound on webpage? - by RichardGv - 08-06-2010, 11:02 AM
RE: invisible sound on webpage? - by khy - 08-06-2010, 11:36 AM
RE: invisible sound on webpage? - by Vanilla - 08-06-2010, 11:23 PM
RE: invisible sound on webpage? - by CrazySp4ce - 08-07-2010, 10:52 PM

Forum Jump: