Embeding mp3 doesn't work ... help

?

=?iso-8859-1?Q?Kim_Andr=E9_Aker=F8?=

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.

Doesn't work for me. (Opera 8.01 on Windows XP SP2)

You're right about the <object> and <param> tags not being proprietary,
but the plugin you're using is. (Microsoft ActiveX control for Windows
Media Player)
 
B

bunch92

You're right about the <object> and <param> tags not being proprietary,
but the plugin you're using is. (Microsoft ActiveX control for Windows
Media Player)

Thanks

Is there a "universal plugin" I could use instead ? Or one that is
supported by more browsers ?
 
P

Philip Ronan

Is there a "universal plugin" I could use instead ? Or one that is
supported by more browsers ?

Maybe I'm missing something here, but if this works for .wav files:

<EMBED src="foo.wav" height="20" width="100" hidden autoplay="true">

then surely this should work for .mp3 files:

<EMBED src="foo.mp3" height="20" width="100" hidden autoplay="true">

Why are you bothering with all this ActiveX nonsense?
 
S

Spartanicus

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).

Opening new windows is another firm favourite in the top ten of things
people hate about web sites. You seem really determined to drive away
users.
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"

It's your responsibility to properly present the content, it's none of
your business how the user handles it. Attempts to embed audio will only
result in clients not being able to play the audio at all.
I wanted something embeded

First rule of web design: It's not about *you*. What is the point of
tailoring something to your preference when you know that doing so will
prevent others from using your content?
 
J

Jonathan N. Little

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

The usual hack is:
(note: not html 4.01 strict!!)

<object ...>
<param name="src" value="some.mp3">
 
B

bunch92

Opening new windows is another firm favourite in the top ten of things
people hate about web sites. You seem really determined to drive away
users.

I knew you were going to say that ... and I agree.

Clicking on the button will actually display what is being played in a
frame at the bottom of the page. So if they click "O", they will hear
"O" and see the message saying "loading and playing "O" at the bottom of
the page.

This works perfectly at the moment with WAV sounds (no pop-ups at all)
and makes it easier for the user to naviguate the site.

Imagine if they had to open/close their sound application 26 times for
each letter of the alphabet ....


It's your responsibility to properly present the content, it's none of
your business how the user handles it. Attempts to embed audio will
only result in clients not being able to play the audio at all.


First rule of web design: It's not about *you*. What is the point of
tailoring something to your preference when you know that doing so
will prevent others from using your content?

Agree in most of cases .. but not really in my case.
 
S

Spartanicus

I knew you were going to say that ... and I agree.

Clicking on the button will actually display what is being played in a
frame at the bottom of the page. So if they click "O", they will hear
"O" and see the message saying "loading and playing "O" at the bottom of
the page.

This works perfectly at the moment with WAV sounds (no pop-ups at all)

It may work on *your* system, but it won't work on *my* system. Had you
done the sensible thing it would have worked on my and similarly
configured systems, and that's *your* loss.
and makes it easier for the user to naviguate the site.

Imagine if they had to open/close their sound application 26 times for
each letter of the alphabet ....

Again: what happens depends on the client configuration. If as I do the
user has the browser setup to hand off audio to their preferred external
application then you should not be trying to interfere with that choice.
When I click a link to an audio file my audio player starts minimized to
the systray, it will stay open for subsequent clicks on audio files
until I close it.
 
B

bunch92

It may work on *your* system, but it won't work on *my* system. Had
you done the sensible thing it would have worked on my and similarly
configured systems, and that's *your* loss.

ok
I installed Firefox to test my site ... and I have to say that
Spartanicus is right ... it didn't work (WAV or MP3) as I didn't have
the quicktime plugin (which is 21mb btw) ...

So I guess users need to have 4 choices :
embeded WAV
popup WAV
embeded MP3
popup MP3

Damn, let's go to work now
 
T

Travis Newbury

I installed Firefox to test my site ... and I have to say that
Spartanicus is right ... it didn't work (WAV or MP3) as I didn't have
the quicktime plugin (which is 21mb btw) ...

Technically speaking, he is usually right. The links to his streaming
media discutions are right on the money.
 
S

Spartanicus

ok
I installed Firefox to test my site ...

You still don't get it, it's not about what browser a client is using,
it needs to work for all users using all sorts of browsers.
... it didn't work (WAV or MP3) as I didn't have
the quicktime plugin (which is 21mb btw) ...

It also isn't about what, if any, plugins the user has, or if they are
enabled or not.
So I guess users need to have 4 choices :
embeded WAV
popup WAV
embeded MP3
popup MP3

Again: a single link enables your content to work for all people using
all browsers, plugins or no plugins. Don't like the way clicking a link
to an audio resource works on your system?: Change your system's
settings!
Damn, let's go to work now

Until you change your approach all you'll be doing is making a bad
situation worse.
 
S

SpaceGirl

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).





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.

You're MUCH better off doing all of this in Flash you know. You have
complete control over the audio, playback and how it all works together
inside of Flash. You can embed and link to most media formats that way.
Almost everyone has Flash, and it's far easy to code for and support
because Flash works the same on all browsers. All you have to have on
your site is one (or more) Flash container movies and something there to
tell people how to get the Flash player if they haven't. Like I said,
most people do.

--


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: 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.

It would not rate badly for people who specifically use a site that teaches
the sounds of vowels and stuff... Don't fall for unexamined nostrums drawn
from opinion polls...
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).

The OP says it did not work. So I hope he comes back and gives more details.

dorayme
 
D

dorayme

From: "[email protected] said:
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 ?

Does not work in any of my browsers, it may not be your fault? You
specify Windows Media Player and there are issues here. I was able to
get the sound by going to the source at
http://70.84.175.210/~perigno/fr/lessonbeg/sound/o.mp3 and it then
played in my browser window in Quicktime. With a movie bar and sound
controls and all that palava to hear the nice short vowel. Perhaps
Spartanicus should conduct a survey of how this would go down generally
with folks... I'd say, 98.2 percent would be pissed off... (relax
Spartinacus, just pulling your chain.... :).

There may be some moral in this. This construction of yours is demanding
a particular player on the original page and I for one have some issues
re this. The beauty of the embed is that it just bloody well played!

I use Mozilla WamCom1.3, IE 5.1.6, iCab 3 which may be enough reason to
ignore me. There may be other reasons too!

Your code is not kosher (I am not talking about the particular sound bit
here). No doc title, no Doctype, not to say about the deprecated
tags...) Just thought you might want to fix this up. You really don't
need so much stuff, tables and divs and deprecated things like font
tags.

dorayme
 
T

Toby Inkster

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

They're not, but you're using them in an entirely
Internet-Explorer-specific way:

<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="./fr/lessonbeg/sound/o.mp3">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="false">
</OBJECT>

Didn't warning bells flash when you saw that the word "Microsoft" appeared
in that code twice?

The correct way of using the <OBJECT> element is like this:

<OBJECT ID="mediaPlayer" TYPE="audio/x-wav"
data="./fr/lessonbeg/sound/o.mp3" height="0" width="0">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="false">
</OBJECT>
 

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

Forum statistics

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

Latest Threads

Top