Google Answers Logo
View Question
 
Q: Browser independent basic sound player ( No Answer,   2 Comments )
Question  
Subject: Browser independent basic sound player
Category: Computers > Internet
Asked by: davidww-ga
List Price: $20.00
Posted: 18 Feb 2006 09:47 PST
Expires: 20 Mar 2006 09:47 PST
Question ID: 447310
I need a robust and browser independent way of playing short sounds
(2-4 seconds) on a website. Something like answers.com,
http://www.answers.com/topic/a-cappella for instance. Nothing fancy is
required, just click a button and play a sound, no volume control,
stop, or pause buttons required.

What are the issues related to doing this? And what is the best solution?

Request for Question Clarification by sublime1-ga on 18 Feb 2006 10:10 PST
david...

I'm not sure what you mean by browser independent, at least
with respect to the answers.com example, which is a typical
.wav file, and plays according to how the browser is set up.
In most cases, the browser is set to play it via the default
.wav file application, e.g. MS Sound Recorder or Media Player.

Since the vast majority of computers are configured to handle
.wav files automatically in this way, I'm not sure I understand
the problem. Please elaborate.

sublime1-ga

Clarification of Question by davidww-ga on 01 Mar 2006 05:19 PST
Hi - just to clarify the question, some sites Merriam-Webster online
(www.m-w.com) for instance do something a bit more fancy involving a
cgi script and I'm unclear why they do that if making a .wav file a
link target will work just as well. Also I'm unclear what determines
whether the plugin launches itself  as a separate application or just
plays the sound without launching.

Request for Question Clarification by sublime1-ga on 10 Mar 2006 14:10 PST
david...

The Merriam-Webster site uses that cgi script for the sake
of providing some degree of elegance, in that the default
player doesn't become visible during playback, but is still
used. Unfortunately, this doesn't always work. For example,
if I click on the speaker icon in IE, it works fine, but in
Mozilla, it doesn't, so I'm forced to use the additional
link that they were forced to provide, which is a standard
link to a .wav file labelled "Click here to listen with your
default audio player." 

There are other 'elegant' solutions that involve using a 
hidden Flash player, but they're more complicated to set up
just for the sake of not having a player pop up, as can be
seen in the source code from this page from freeloops.net

code

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="35" HEIGHT="20" id="51">
<PARAM NAME=movie VALUE="http://free.loops.net/play.swf?theFile=http://free.loops.net/a/1141945045/drm_120_036.wav.mp3">
<PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FF9900>
<EMBED src="http://free.loops.net/play.swf?theFile=http://free.loops.net/a/1141945045/drm_120_036.wav.mp3"
quality=high bgcolor=#FF9900  WIDTH="35" HEIGHT="20" NAME="51"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED></OBJECT>

/code
http://free.loops.net

This actually involves identifying the loop as a 'movie' with
no video, and having the flashplayer play it. It's commonly
used for playing back loops, and, since the flashplayer is
rather ubiquitous, it works with most browsers.

Let me know if this satisfies your interests in asking your
question, and I'll post a formal answer.

sublime1-ga

Request for Question Clarification by sublime1-ga on 19 Mar 2006 13:41 PST
david...

This question is about to expire. I wondered if you felt you received
any benefit from my work on your behalf. If so, please post a
clarification telling me, and I'll post a formal answer and collect
the fee. If you feel the work was worth less than the current price
of $20, you can lower the price of the question to match the value
you feel you've received.

A user's guide on this topic is on skermit-ga's site, here: 
http://www.christopherwu.net/google_answers/answer_guide.html#changing_price 
 
sublime1-ga
Answer  
There is no answer at this time.

Comments  
Subject: Re: Browser independent basic sound player
From: drighten-ga on 20 Feb 2006 22:02 PST
 
http://memory.loc.gov/ammem/help/view.html describes some different
sound formats and audio plugins for windows and mac systems.

Your web server should have the mime type defined for the sound format
(.wav, .mp3, .ram), which is usually the web server default for these
basic sound formats.  The user's computer needs to have a browser
plugin installed that can play that sound format.  The user's browser
needs to be configured properly for the specific sound format to be
assigned to play on the appropriate browser plugin.  Usually users'
have the plugin and browser setup properly for .wav and .mp3 files,
see http://www.macromedia.com/software/player_census/flashplayer/ for
percentages of computers with various plugins.  So I would just
suggest trying .wav or .mp3 and testing it in a few different os /
browser combinations.

If you really wanted to ensure everyone can hear the audio, do browser
testing to see what plugins are available (using something like this
http://gemal.dk/browserspy/).  Then dynamically serve up an audio file
format that will work for an available plugin.  If you made .wav,
.mp3, and .ram files for each audio and tested like this, you would
probably cover 99.99% of users.

Good luck!
Subject: Re: Browser independent basic sound player
From: realethan-ga on 05 Apr 2006 11:58 PDT
 
Macromedia Flash is your best bet for reliably delivering audio to the
broadest possible audience:

http://www.macromedia.com/software/player_census/flashplayer/

You can download a free open-source audio player here:

http://musicplayer.sourceforge.net/

Installation simply requires that you upload the player to your
webserver along with your music or sounds, and then add a couple of
lines of code to the web-page you'd like to add audio to.

If the user interface is too jumbled for you taste, let me know and I
can write you a new one without any extra buttons.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy