Re: How Do I Embed Music............

D

DU

Andrew said:
Well, if somebody is going to be on your site for a while, let's say
it refreshes, or is framed, or whatever, background music can turn
into noise, hence can be annoying, but should you decide to have it,
have it optionable, like this:

<embed src="../../Sounds/Hawaii-50.au" AUTOSTART="FALSE" HEIGHT="45"
WIDTH="280" TITLE="Hawaii-50.au">

By using the above AUTOSTART and the value FALSE, the user has control
over how much they want to listen to your site's music. The HEIGHT
and WIDTH attributes will provide for a control panel which the surfer
can use to play/stop/increase/decrease/mute the volume, etc...

I've got that on my site ( a rather neglected site as I spend too much
time on Usenet :))

Sincerely,

Andrew H. Carter

I entirely agree with the autostart="false" idea/policy/issue. In fact,
it should always be like that, giving the user full and total control
over the music embedded in a page and his experience on a page. May I
suggest a W3C web standards compliant way of coding this though:

<object data="../../Sounds/Hawaii-50.au" type="audio/wav" width="280"
height="45" standby="Loading of music file in progress...please be
patient" title="Hawaii-50">

<param name="AutoStart" value="false">
<param name="AnimationAtStart" value="true">
<param name="AutoRewind" value="false"><!-- AutoRewind does not seem to
work -->
<param name="AutoStart" value="false">
<param name="EnableContextMenu" value="true">
<param name="FileName" value="../../Sounds/Hawaii-50.au">
<param name="ShowAudioControls" value="true">
<param name="ShowPositionControls" value="true">
<param name="ShowStatusBar" value="true">

<param name="ShowControls" value="true">
<param name="xVolume" value="50">
<object width="300" height="100"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading of
Windows Media Player and music file in progress... please be patient"
type="application/x-oleobject" title="Hawaii-50">
<param name="AnimationAtStart" value="true">
<param name="AutoRewind" value="false"><!-- AutoRewind does not seem
to work -->
<param name="AutoStart" value="false">
<param name="EnableContextMenu" value="true">
<param name="FileName" value="../../Sounds/Hawaii-50.au">
<param name="ShowAudioControls" value="true">

<param name="ShowPositionControls" value="true">
<param name="ShowStatusBar" value="true">
<param name="ShowControls" value="true">
<param name="xVolume" value="50">
<strong>Your media player and/or the music file failed to load
properly or to render the music file accordingly.</strong>
</object>
</object>

DU
 
H

Headless

DU said:
I'm not sure I understand what you mean.

1) It didn't work in 2 out of my 3 browsers. It should have provided a
fallback link instead of displaying this text: <strong>Your media player
and/or the music file failed to load properly or to render the music
file accordingly.</strong>
2) The bizarre nesting of an ActiveX object within a generic object.
3) The code you posted causes 2 embedded MS MediaPlayers to appear in
IE6. This is due to the poor way that the <object> tag is supported in
IE (and browsers in general). Theoretically the right way to do it would
be to reverse the nesting, try the ActiveX version first, then the
generic one, then the fallback link (this won't solve the problem of 2
mediaplayers appearing in IE).
4) The ActiveX mediaplayer that appears in IE displays a curtailed
window for video, this should not happen for audio content. The generic
mediaplayer UI is also curtailed. (using MS MediaPlayer 6.4).

Many people would want to use the code you posted on a page with other
content. The code should only be used on a separate page with no other
content, and then linked to to address the issue that web pages should
not autostart mediaplayers until a user has selected to view the
audio/video.
I followed an example given. I may have wrongly followed such example,
wrongly understood the example.

Ah, a copy and paste job. That's a tricky thing to do if you don't
actually know what you are doing.


Headless
 
D

DU

Headless said:
1) It didn't work in 2 out of my 3 browsers. It should have provided a
fallback link instead of displaying this text: <strong>Your media player
and/or the music file failed to load properly or to render the music
file accordingly.</strong>

Fallback link for music? If the music can not be listened - whatever the
reason -, then what would be a fallback link?
2) The bizarre nesting of an ActiveX object within a generic object.
3) The code you posted causes 2 embedded MS MediaPlayers to appear in
IE6. This is due to the poor way that the <object> tag is supported in
IE (and browsers in general).

Yes. That is a confirmed bug in MSIE 6.

Theoretically the right way to do it would
be to reverse the nesting, try the ActiveX version first, then the
generic one, then the fallback link (this won't solve the problem of 2
mediaplayers appearing in IE).

Yeah. That makes sense.
4) The ActiveX mediaplayer that appears in IE displays a curtailed
window for video, this should not happen for audio content. The generic
mediaplayer UI is also curtailed. (using MS MediaPlayer 6.4).

curtailed.. hmm.. I set some space (width and height) to render the
media controls, slider, etc.
Many people would want to use the code you posted on a page with other
content. The code should only be used on a separate page with no other
content, and then linked to to address the issue that web pages should
not autostart mediaplayers until a user has selected to view the
audio/video.




Ah, a copy and paste job. That's a tricky thing to do if you don't
actually know what you are doing.

No. Not a copy and paste job. I followed an example but wrongly
understood it.

DU
 
H

Headless

DU said:
Fallback link for music? If the music can not be listened - whatever the
reason -, then what would be a fallback link?

The reason it didn't work in 2 out of my 3 modern browsers is that I
don't allow media players to run embedded (I don't allow it in IE
either, but it ignores my settings). I do have media players capable of
handling the data, but it requires a normal link. This is how it should
have been constructed in theory:

<object ActiveX>
<object Generic>
<a href="music.wav">Play music</a>
</object>
curtailed.. hmm.. I set some space (width and height) to render the
media controls, slider, etc.

Width and height should be omitted, you can't (and shouldn't try to)
control which media player will be invoked on a client system, so
specifying width and height for it's UI widget is silly.

This also applies if the ActiveX version is invoked since there are
several versions of MS MediaPlayer, I assume that each has it's own UI
widget.

Another point, you attempt to control to many variables via the <param>
element, setting "autostart" to false is of course very welcome (as alas
with MS MediaPlayer it defaults to "true"), but you should specify as
few as possible, this one is particularly nasty:

<param name="xVolume" value="50">

Fortunately it's ignored on my system, but it really shouldn't be there.


Headless
 
W

Whitecrest

The reason it didn't work in 2 out of my 3 modern browsers is that I
don't allow media players to run embedded (I don't allow it in IE
either, but it ignores my settings). I do have media players capable of
handling the data, but it requires a normal link....

I think there is a difference in how people in this forum have browsers
set up (and which one they tend to use) and that of the "real world"
Most (and feel free to search for statistics that show the opposite to
be true) people do not configure their browsers, they don't turn off
JavaScript, they allow flash, and embedded video, and they are quite
happy doing so. THESE people are your customers.

Members of this forum do not represent the real world. A perfect
example is JavaScript. Here I would guess about 80% have it turned off.
In the real world the numbers range from 5% to 15% have it turned off.
 
B

brucie

A perfect example is JavaScript. Here I would guess about 80% have it
turned off. In the real world the numbers range from 5% to 15% have it
turned off.

thats 58 to 87 million people and may be as high as 98.25 million
people.
 
W

Whitecrest

thats 58 to 87 million people and may be as high as 98.25 million
people.

87 million (we will use the middle number as a guide) out of almost a
billion possible people? Completely irrelevant. The odds are even more
in your favor with some research to find if your target audience uses
JavaScript or not. If they do, then you can use it, if not, then you
don't use it.
 
B

brucie

thats actually numbers for 10-15%, not the 5-15% you said.
87 million (we will use the middle number as a guide) out of almost a
billion possible people?

no, just over half a billion

Worldwide Internet Population 2002:
580 million (Nielsen//NetRatings)
655 million (ITU)
May 23, 2003
Completely irrelevant.

87 million is over half the US internet population. its waaay more
than the 6.6 million in australia.
The odds are even more in your favor with some research to find if your
target audience uses JavaScript or not. If they do, then you can use it,
if not, then you don't use it.

you may get a few hundred visitors with JS spending $10 on your site
but then you may turn away the one visitor without JS that wants to
spend a few thousand.

whats wrong with using it as much as you want but not making a
requirement that the visitor has it?
 
W

Whitecrest

you may get a few hundred visitors with JS spending $10 on your site
but then you may turn away the one visitor without JS that wants to
spend a few thousand.

But then again, the one I turn way (one out of a few hundred acording to
you) may have just spent $10, and one of the ones I got spent $1000.
whats wrong with using it as much as you want but not making a
requirement that the visitor has it?

Absolutely nothing is wrong with doing that. I have never said there is
anything wrong with doing that. What I have always said was using
javascript, flash, embedded video etc.... is perfectly.

But you have to remember for every new technology you use, you will
loose some customers. If the use the the technology brings you more
customers than you loose, then you win. If you use the technology, and
your profits increase because of that, then you would be an idiot to
stop using it.
 

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,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top