Using Media Player

Discussion in 'HTML' started by Cogito, Jul 10, 2007.

  1. Cogito

    Cogito Guest

    When I use the following code to play a radio station it works well
    and the station plays as soon as the page loads.

    But, I want the page loads without automatically playing and to let
    the user starts the play by pressing the "Play" button.
    However, when I change the parameter

    <PARAM NAME="AutoStart" Value="true">
    to
    <PARAM NAME="AutoStart" Value="false">
    it does not work.

    What is the problem or what else needs to be done?

    Here is the code:

    <html>
    <body bgcolor="#333367" text="#660000" link="#660000" vlink="#660000"
    alink="#990000" topmargin="0" marginheight="0" leftmargin="0"
    marginwidth="0">


    <div align="center">

    <OBJECT ID="MediaPlayer"
    classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"

    CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
    width="153" height="53" style="background-color:000000"
    standby="Loading Microsoft Windows Media Player components..."
    type="application/x-oleobject">
    <PARAM NAME="FileName"
    VALUE="http://www.abc.net.au/streaming/newsradio.asx">
    <PARAM NAME="TransparentAtStart" Value="true">
    <PARAM NAME="AutoStart" Value="true">
    <PARAM NAME="AnimationatStart" Value="false">
    <PARAM NAME="ShowStatusBar" Value="true">
    <PARAM NAME="ShowControls" Value="true">
    <PARAM NAME="autoSize" Value="false">
    <PARAM NAME="displaySize" Value="false">
    <PARAM NAME="ShowAudioControls" Value="true">
    <PARAM NAME="ShowPositionControls" Value="false">
    <Embed type="application/x-mplayer2"

    pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"src=""
    Name="MediaPlayer"
    width="153" height="53"
    style="background-color:000000">
    </embed>
    </OBJECT>
    </div>
    </body>
    </html>
    Cogito, Jul 10, 2007
    #1
    1. Advertising

  2. Cogito

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Mon, 09 Jul 2007 23:18:52
    GMT Cogito scribed:

    > When I use the following code to play a radio station it works well
    > and the station plays as soon as the page loads.
    >
    > But, I want the page loads without automatically playing and to let
    > the user starts the play by pressing the "Play" button.
    > However, when I change the parameter
    >
    > <PARAM NAME="AutoStart" Value="true">
    > to
    > <PARAM NAME="AutoStart" Value="false">
    > it does not work.
    >
    > What is the problem or what else needs to be done?
    >
    > Here is the code:

    <snip>

    The probably is proprietary system operands and active-x in general.

    --
    Neredbojias
    A self-made man who worships his creator
    Neredbojias, Jul 10, 2007
    #2
    1. Advertising

  3. Cogito

    cwdjrxyz Guest

    On Jul 9, 6:18 pm, Cogito <> wrote:
    > When I use the following code to play a radio station it works well
    > and the station plays as soon as the page loads.
    >
    > But, I want the page loads without automatically playing and to let
    > the user starts the play by pressing the "Play" button.
    > However, when I change the parameter
    >
    > <PARAM NAME="AutoStart" Value="true">
    > to
    > <PARAM NAME="AutoStart" Value="false">
    > it does not work.
    >
    > What is the problem or what else needs to be done?
    >
    > Here is the code:
    >
    > <html>
    > <body bgcolor="#333367" text="#660000" link="#660000" vlink="#660000"
    > alink="#990000" topmargin="0" marginheight="0" leftmargin="0"
    > marginwidth="0">
    >
    > <div align="center">
    >
    > <OBJECT ID="MediaPlayer"
    > classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
    >
    > CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab..."
    > width="153" height="53" style="background-color:000000"
    > standby="Loading Microsoft Windows Media Player components..."
    > type="application/x-oleobject">
    > <PARAM NAME="FileName"
    > VALUE="http://www.abc.net.au/streaming/newsradio.asx">
    > <PARAM NAME="TransparentAtStart" Value="true">
    > <PARAM NAME="AutoStart" Value="true">
    > <PARAM NAME="AnimationatStart" Value="false">
    > <PARAM NAME="ShowStatusBar" Value="true">
    > <PARAM NAME="ShowControls" Value="true">
    > <PARAM NAME="autoSize" Value="false">
    > <PARAM NAME="displaySize" Value="false">
    > <PARAM NAME="ShowAudioControls" Value="true">
    > <PARAM NAME="ShowPositionControls" Value="false">
    > <Embed type="application/x-mplayer2"
    >
    > pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPla..."src=""
    > Name="MediaPlayer"
    > width="153" height="53"
    > style="background-color:000000">
    > </embed>
    > </OBJECT>
    > </div>
    > </body>
    > </html>


    This code uses an ActiveX object that is understood only by IE
    browsers and close relatives. It has an embed path within it that is
    invalid code, but that often is used and works for browsers that do
    not support ActiveX, such as Firefox and Opera. If you change to not
    autostart with the parameter in the main ActiveX path, this change
    will be seen only by IE browsers. A change would have to be made in
    the embed path, which apparently is defaulting to autostart, to defeat
    autostart on non-IE browsers. The code appears to be several years
    old. If you have both an IE and a Firefox or Opera browser, try
    viewing with both.
    cwdjrxyz, Jul 10, 2007
    #3
  4. Cogito

    cwdjrxyz Guest

    On Jul 9, 9:57 pm, cwdjrxyz <> wrote:
    > On Jul 9, 6:18 pm, Cogito <> wrote:
    >
    >
    >
    > > When I use the following code to play a radio station it works well
    > > and the station plays as soon as the page loads.

    >
    > > But, I want the page loads without automatically playing and to let
    > > the user starts the play by pressing the "Play" button.
    > > However, when I change the parameter

    >
    > > <PARAM NAME="AutoStart" Value="true">
    > > to
    > > <PARAM NAME="AutoStart" Value="false">
    > > it does not work.

    >
    > > What is the problem or what else needs to be done?

    >
    > > Here is the code:

    >
    > > <html>
    > > <body bgcolor="#333367" text="#660000" link="#660000" vlink="#660000"
    > > alink="#990000" topmargin="0" marginheight="0" leftmargin="0"
    > > marginwidth="0">

    >
    > > <div align="center">

    >
    > > <OBJECT ID="MediaPlayer"
    > > classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"

    >
    > > CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab..."
    > > width="153" height="53" style="background-color:000000"
    > > standby="Loading Microsoft Windows Media Player components..."
    > > type="application/x-oleobject">
    > > <PARAM NAME="FileName"
    > > VALUE="http://www.abc.net.au/streaming/newsradio.asx">
    > > <PARAM NAME="TransparentAtStart" Value="true">
    > > <PARAM NAME="AutoStart" Value="true">
    > > <PARAM NAME="AnimationatStart" Value="false">
    > > <PARAM NAME="ShowStatusBar" Value="true">
    > > <PARAM NAME="ShowControls" Value="true">
    > > <PARAM NAME="autoSize" Value="false">
    > > <PARAM NAME="displaySize" Value="false">
    > > <PARAM NAME="ShowAudioControls" Value="true">
    > > <PARAM NAME="ShowPositionControls" Value="false">
    > > <Embed type="application/x-mplayer2"

    >
    > > pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPla..."src=""
    > > Name="MediaPlayer"
    > > width="153" height="53"
    > > style="background-color:000000">
    > > </embed>
    > > </OBJECT>
    > > </div>
    > > </body>
    > > </html>

    >
    > This code uses an ActiveX object that is understood only by IE
    > browsers and close relatives. It has an embed path within it that is
    > invalid code, but that often is used and works for browsers that do
    > not support ActiveX, such as Firefox and Opera. If you change to not
    > autostart with the parameter in the main ActiveX path, this change
    > will be seen only by IE browsers. A change would have to be made in
    > the embed path, which apparently is defaulting to autostart, to defeat
    > autostart on non-IE browsers. The code appears to be several years
    > old. If you have both an IE and a Firefox or Opera browser, try
    > viewing with both.


    I have a working example at http://www.cwdjr.info/test/ng.php using
    the radio station you selected. I had to use slightly different code
    from usual since this a streaming asf file rather than a .wma file.
    The player code you were using was designed for a WMP. If you do not
    have a WMP, then the code will not work. Thus I have a text click link
    just above where the player will be. What you get when you click it
    depends on your computer setup. In many cases this link will allow
    playing on players other than WMP that will support asf streaming
    files. If you want the code in html 4.01 strict, view the source using
    an IE browser. If you want the code in xhtml 1.1, view the code on a
    recent Firefox or Opera browser. The page as written works, using
    either the WMP that comes up or the text link, on IE6, and the most
    recent versions of Firefox, Opera, and Safari 3 for a Windows XP or
    above OS. It works using the most recent WMP 11 which can be
    downloaded only to Windows XP or Vista OSs.
    cwdjrxyz, Jul 10, 2007
    #4
  5. Cogito

    Cogito Guest

    >
    >I have a working example at http://www.cwdjr.info/test/ng.php using
    >the radio station you selected. I had to use slightly different code
    >from usual since this a streaming asf file rather than a .wma file.
    >The player code you were using was designed for a WMP. If you do not
    >have a WMP, then the code will not work. Thus I have a text click link
    >just above where the player will be. What you get when you click it
    >depends on your computer setup. In many cases this link will allow
    >playing on players other than WMP that will support asf streaming
    >files. If you want the code in html 4.01 strict, view the source using
    >an IE browser. If you want the code in xhtml 1.1, view the code on a
    >recent Firefox or Opera browser. The page as written works, using
    >either the WMP that comes up or the text link, on IE6, and the most
    >recent versions of Firefox, Opera, and Safari 3 for a Windows XP or
    >above OS. It works using the most recent WMP 11 which can be
    >downloaded only to Windows XP or Vista OSs.



    Your example is spot on!!! It is just what I wanted. Thank you so
    much.
    And I spent hours playing around with the 'autoStart' parameter
    without much success.
    The second half of your code handles even Firefox. What can I say?
    It's more than I bargained for.
    Cogito, Jul 10, 2007
    #5
    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. =?Utf-8?B?Sm9uIFNjaHdhcnR6?=

    RE: Using Windows Media Player 10 on an ASPX page

    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=, Jan 31, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    403
    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=
    Jan 31, 2005
  2. =?Utf-8?B?Sm9uIFNjaHdhcnR6?=

    Using Windows Media Player 10 on an ASPX page

    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=, Jan 31, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    471
    =?Utf-8?B?Sm9uIFNjaHdhcnR6?=
    Jan 31, 2005
  3. cyshao
    Replies:
    1
    Views:
    3,304
    Steve C. Orr [MVP, MCSD]
    Apr 12, 2005
  4. ary
    Replies:
    1
    Views:
    1,069
    =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=
    Nov 28, 2006
  5. Mario Ciappara

    Creating Media Player object using javascript

    Mario Ciappara, Jul 7, 2003, in forum: Javascript
    Replies:
    0
    Views:
    173
    Mario Ciappara
    Jul 7, 2003
Loading...

Share This Page