Embeding mp3 doesn't work ... help

G

Guest

I am creating a site to learn a foreign language. I will have hundreds of
sounds (each no longer than 5 seconds).

I don't want the users to have pop-up windows at all so I need the sounds to
be embeded.

I can make it work with WAV files :
http://www.perignon.co.uk/testwav.html

but it doesn't work with MP3 :
http://www.perignon.co.uk/testmp3.html

What am I doing wrong ? The server I use says it has got the audio mp3 MIME
so it should work ?

The mp3 source is in :
http://www.perignon.co.uk/fr/lessonbeg/sound/o.mp3
and works fine.

The code is :
<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading
Microsoft Windows Media Player components..."
TYPE="application/x-oleobject"> <PARAM NAME="fileName"
VALUE="http://www.perignon.co.uk/fr/lessonbeg/sound/o.mp3"> <PARAM
NAME="animationatStart" VALUE="true"> <PARAM NAME="transparentatStart"
VALUE="true"> <PARAM NAME="autoStart" VALUE="true"> <PARAM
NAME="showControls" VALUE="true"> </OBJECT>



Thank you for your help.
 
S

Spartanicus

I am creating a site to learn a foreign language. I will have hundreds of
sounds (each no longer than 5 seconds).

I don't want the users to have pop-up windows at all so I need the sounds to
be embeded.

better yet use redirector said:
The code is :
<OBJECT ID="mediaPlayer"
CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
CODEBASE="http://activex.microsoft.com/activex/
controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" STANDBY="Loading
Microsoft Windows Media Player components..."
TYPE="application/x-oleobject"> <PARAM NAME="fileName"
VALUE="http://www.perignon.co.uk/fr/lessonbeg/sound/o.mp3"> <PARAM
NAME="animationatStart" VALUE="true"> <PARAM NAME="transparentatStart"
VALUE="true"> <PARAM NAME="autoStart" VALUE="true"> <PARAM
NAME="showControls" VALUE="true"> </OBJECT>

Horrible MS specific ActiveX crap.
 
S

Spartanicus

I tried that but the sound is not embeded. It opens in a new window ....

What happens depends on the user's configuration, change your
configuration if you don't like a new window.

Altering the website coding to circumvent a configuration error on your
computer will only result in a broken website for others.
 
T

Travis Newbury

Spartanicus said:
Altering the website coding to circumvent a configuration error on your
computer will only result in a broken website for others.

But it works the way it was designed. So you have to weigh which is
more important to the overall success of the site. And only the OP can
be the judge of that.
 
T

Travis Newbury

got it working using the bgsound and using :

You realize of course that this will not work for everyone. So if your
audience uses IE and has a configuration like yours, then you are fine.
But if some of your visitors have something different (say one of the
many browsers that do not support bgsound) then they get nothing. So
you might want to use bgsound AND supply a link for everyone else.

This way for the vast majority of your visitors, it works the way you
designed it, and for the rest of your visitors they get to use the link
to hear the sound.

Kind of the best of both worlds.
 
S

SpaceGirl

OK
got it working using the bgsound and using :

./path

instead of

http://mysite/path

Wont work in any browsers I use, you 10-15% of browsers most people use.
Why would I want to hear sound from a web site unless I specifically
asked for it? Generally I have music playing while I'm at the computer.
Last thing I want is ANOTHER mp3 playing at the same time...

--


x theSpaceGirl (miranda)

# lead designer @ http://www.dhnewmedia.com #
# remove NO SPAM to email, or use form on website #
# this post (c) Miranda Thomas 2005
# explicitly no permission given to Forum4Designers
# to duplicate this post.
 
D

dorayme

From: said:
I am creating a site to learn a foreign language. I will have hundreds of
sounds (each no longer than 5 seconds).

I don't want the users to have pop-up windows at all so I need the sounds to
be embeded.

I can make it work with WAV files :
http://www.perignon.co.uk/testwav.html

Amazing how well this works! Never mind the majority of the code at
http://70.84.175.210/~perigno/testwav.html, does anyone have a browser
(where they have not turned off relevant preferences or options and do not
play background music like Spacegirl) that does not play the wav file with
the embed. Works well in all my browsers, not just IE.

dorayme
 
G

Guest

Thank you all for your advice.

Users will have a choice between the embed WAV (which works with all
browsers hopefully), or the bgsound MP3 (only IE ?).

They will be able to make their choice when they register by doing a simple
test, and the site will point to the relevant files according to that first
choice ...

It is the best I can think of as objetct/param tags didn't work properly.
 
S

Spartanicus

Thank you all for your advice.

What advice? Quote a minimal bit of what you are replying to, put your
reply beneath it.
Users will have a choice between the embed WAV (which works with all
browsers hopefully)

It won't.
, or the bgsound MP3 (only IE ?).

Apart from the flawed method of using the embed element, any form of
embedding (and that includes bgsound) is flawed. Embedded audio is in
the top ten of things people hate about web sites.
They will be able to make their choice when they register by doing a simple
test, and the site will point to the relevant files according to that first
choice ...

It is the best I can think of as objetct/param tags didn't work properly.

You've been shown how to do this in a way that enables it to work for
*all* clients (at so that the audio only plays at the user's request
only). It's pointless if it "works" on your computer, if you are
creating a web site then it needs to work for *others*.
 
T

Travis Newbury

Spartanicus said:
Apart from the flawed method of using the embed element, any form of
embedding (and that includes bgsound) is flawed. Embedded audio is in
the top ten of things people hate about web sites.

Unless it is requested. And in this case the OP implied that it was
infact being requested to be played that way.
You've been shown how to do this in a way that enables it to work for
*all* clients (at so that the audio only plays at the user's request
only). It's pointless if it "works" on your computer, if you are
creating a web site then it needs to work for *others*.

The OP has done extra work to assure that both those that want a
background sound and those that don't can have what they want. Your
reply seems to be saying, you should not even give them that choice.
 
B

bunch92

Apart from the flawed method of using the embed element, any form of
embedding (and that includes bgsound) is flawed. Embedded audio is in
the top ten of things people hate about web sites.

What I showed you in that test is only the tip of the iceberg. User will
have a choice of lets say 20 sounds to play on the page (i.e. 20 "play"
buttons).

When they click on the button, a new page will open with the sound
embeded (if they chose WAV) or in background mode (if they chose MP3).

You've been shown how to do this in a way that enables it to work for
*all* clients (at so that the audio only plays at the user's request
only). It's pointless if it "works" on your computer, if you are
creating a web site then it needs to work for *others*.

No I have not. What you showed me say :
"Linking to the redirector file will cause the associated player
software to start on the client computer"

I wanted something embeded (like for the wav example) but unfortunately
it doesn't seem achivable with MP3.
 
B

bunch92

Amazing how well this works! Never mind the majority of the code at
http://70.84.175.210/~perigno/testwav.html, does anyone have a browser
(where they have not turned off relevant preferences or options and do
not play background music like Spacegirl) that does not play the wav
file with the embed. Works well in all my browsers, not just IE.

dorayme

Yes dorayme, WAV works great.

But because of download time problems, I thought it would have been nice
to have an MP3 option to work EXACTLY the same way.

I thought I would be able to use ..<embed>.. or ...<object><parameter
autoplay>... but as you can see, my testpage doen't work :
http://www.perignon.co.uk/testmp3.html
 
R

Rincewind

Wont work in any browsers I use, you 10-15% of browsers most people use.
Why would I want to hear sound from a web site unless I specifically
asked for it? Generally I have music playing while I'm at the computer.
Last thing I want is ANOTHER mp3 playing at the same time...

Well if its a site to learn a foreign language you probably would want to
hear it.
 
T

Travis Newbury

Rincewind said:
Well if its a site to learn a foreign language you probably would want to
hear it.

You have a great solution. The user gets to decide if they want a pop
up (aka a link) or if they want embeded audio. If one doesn't work for
the user, they can change to the other. This is a perfectly acceptable
solution to your problem.

And while they mean well, sometimes people here talk in absolutes and
ignore the common sense part of the solution.
 
B

bunch92

You have a great solution. The user gets to decide if they want a pop
up (aka a link) or if they want embeded audio. If one doesn't work
for the user, they can change to the other. This is a perfectly
acceptable solution to your problem.

That sounds good, but that means 4 different ways (i.e. WAV embed,WAV
link, MP3 embed and MP3 link) ... that's going to be tricky to code but
would be the best solution I guess.

I still think users prefer an "embeded" solution for this kind of site,
because it can become annoying to have the sound window to popup
everytime you want to learn a new word.

Cheers
 
B

bunch92

Hi again,

The problem with my code was on the following line :
<PARAM NAME="fileName"
VALUE="http://www.perignon.co.uk/fr/lessonbeg/sound/o.mp3">

When replaced with :
<PARAM NAME="fileName" VALUE="./fr/lessonbeg/sound/o.mp3">


The sound plays !!!! (I am using IE6)

And the <OBJECT><PARAM> tags are not proprietary (unlike bgsound) so it
should work in most of the browsers ....

Can you guys try
http://www.perignon.co.uk/testmp3.html
and tell me if it works for you please ?

Thank you all for you help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top