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

Discussion in 'HTML' started by DU, Jun 28, 2003.

  1. DU

    DU Guest

    Andrew H. Carter wrote:

    > On Sat, 21 Jun 2003 22:02:30 +0100, "Dave"
    > <> wrote:
    >
    >
    >>Hi Guys,
    >>
    >>Can anyone please show me the coding to embed music into an html web page. A
    >>friend of mine has asked because she wants to put a small piece of
    >>background music into a schools home page.
    >>
    >>Many thanx
    >>
    >>Dave

    >
    >
    >
    > 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
    ---------------------------
    Javascript and Browser bugs:
    http://www10.brinkster.com/doctorunclear/
    DU, Jun 28, 2003
    #1
    1. Advertising

  2. DU

    Headless Guest

    DU <> wrote:

    >>>May I
    >>>suggest a W3C web standards compliant way of coding this though:

    >>
    >> It may be valid, but it's still incorrect.

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

    >> Why did you nest an ActiveX control into a generic one?

    >
    >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
    Headless, Jun 29, 2003
    #2
    1. Advertising

  3. DU

    DU Guest

    Headless wrote:
    > DU <> wrote:
    >
    >
    >>>>May I
    >>>>suggest a W3C web standards compliant way of coding this though:
    >>>
    >>>It may be valid, but it's still incorrect.

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


    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.
    >
    >
    >>>Why did you nest an ActiveX control into a generic one?

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


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

    >
    > Headless
    >


    DU
    --
    Javascript and Browser bugs:
    http://www10.brinkster.com/doctorunclear/
    DU, Jun 29, 2003
    #3
  4. DU

    Headless Guest

    DU <> wrote:

    >> 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?


    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>
    </object>

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


    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
    Headless, Jun 29, 2003
    #4
  5. DU

    Whitecrest Guest

    In article <>,
    says...
    > 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.


    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jun 29, 2003
    #5
  6. DU

    brucie Guest

    In post <>
    Whitecrest said...

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

    --
    brucie a. blackford. 30/June/2003 06:28:39 am kilo.
    http://loser.brucies.com/
    brucie, Jun 29, 2003
    #6
  7. DU

    Whitecrest Guest

    In article <bdni7a$ubti9$>,
    says...
    > > 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.


    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.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jun 30, 2003
    #7
  8. DU

    brucie Guest

    In post <>
    Whitecrest said...

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


    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?

    --
    brucie a. blackford. 01/July/2003 06:02:58 am kilo.
    http://loser.brucies.com/
    brucie, Jun 30, 2003
    #8
  9. DU

    Whitecrest Guest

    In article <bdq5pp$v6tch$>,
    says...
    > 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.

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jul 1, 2003
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Chan

    Music

    Mike Chan, Aug 19, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    539
    Jurjen de Groot
    Aug 20, 2003
  2. =?Utf-8?B?ZGhucml2ZXJzaWRl?=

    wma / drm / music download theory help!

    =?Utf-8?B?ZGhucml2ZXJzaWRl?=, Mar 6, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    345
    Scott Allen
    Mar 6, 2005
  3. Headless
    Replies:
    12
    Views:
    2,986
    Toby A Inkster
    Jul 6, 2003
  4. SwissCheese

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

    SwissCheese, Jun 26, 2003, in forum: HTML
    Replies:
    11
    Views:
    1,718
  5. AllYou!
    Replies:
    2
    Views:
    616
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Apr 10, 2007
Loading...

Share This Page