Web Analytics Made Easy -
StatCounter Embedded WMP - Won't play w/code... - CodingForum

Announcement

Collapse
No announcement yet.

Embedded WMP - Won't play w/code...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Embedded WMP - Won't play w/code...

    As seen here www.mubiquity.com I have no play functionality with the embedded player on my site. I can turn volume up/down, mute and move progress bar but play/stop/pause are all greyed out. Im using the following code. Anyone tell me what Im missing?

    <html>

    <head>

    <script language="javascript">

    function loadplayercontrols()
    {

    Player.FileName="\\sample.wmv";
    Player.ShowControls=1;
    player.AutoRewind=1;
    player.EnableTracker=0;
    player.Volume ="-450";
    Player.Play();

    }

    </script>

    </head>

    <body onLoad="loadplayercontrols()">
    <object id="Player" width="208" height="231" class="back"
    classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" standby="Loading
    Windows Media Player components..." type="application/x-oleobject">

    <param name="loop" value="1">
    <embed width="208" height="231" loop="1" src="1">
    </embed>
    </object>

    </body>

    </html>

    Cheers, Chaser

  • #2
    Looks like you have an incorrect filename value. Just so you know the javascript and playing you are using will only work in IE.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      Thanks AeroSpace my code looks as below ( www.ryanismy.name ) and I have a sample.wmv on my host's server ( www.ryanismy.name/sample.wmv ) . Unfortunately, the play button is still greyed out.

      <html>

      <head>

      <script language="javascript">

      function loadplayercontrols()
      {

      Player.FileName="\\sample.wmv";
      Player.ShowControls=1;
      player.AutoRewind=1;
      player.EnableTracker=0;
      player.Volume ="-450";
      Player.Play();

      }

      </script>

      </head>

      <body onLoad="loadplayercontrols()">
      <object id="Player" width="208" height="231" class="back"
      classid="CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6" standby="Loading
      Windows Media Player components..." type="application/x-oleobject">

      <param name="loop" value="1">
      <embed width="208" height="231" loop="1" src="1">
      </embed>
      </object>

      </body>

      </html>

      Well thank u for any and all thoughts and help!

      Cheers, Chaser
      Last edited by chaser7016; Oct 13, 2006, 09:31 PM.

      Comment


      • #4
        Sighs I guess a little more detail to my answer will help you understand what I'm saying better. Remove the stuff in red
        Code:
        Player.FileName="[color=red]\\[/color]sample.wmv";
        Player.ShowControls=1;
        player.AutoRewind=1;
        player.EnableTracker=0;
        player.Volume ="-450";
        Player.Play();
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment


        • #5
          Hi thank you so much for your help. Sorry if Im a bit of tard in regards to programming, Im learning as I go.

          The goal here is to create an embedded player that will work in regular Internet Explorer and Internet Explorer for Pocket PC. I have a Treo 700w SmartPhone in which I access the Internet using Internet Explorer Pocket PC. I want to be able via my Treo to go to my site and tune into sample.wmv for instance; ultimately my online radio station, but first Im just trying to get the play button to work properly.

          If you go here www.mubiquity.com I am using different code that works fine on a PC, but through PIE(PocketPC IE) I choose the play button causing a windows error to pop up stating, "Parameter is Incorrect" and nothing plays.

          If you go here www.ryanismy.name you will c Im using the code listed in this posting where I removed the two red dashes u suggested. Well maybe I missing something more then the removal of those two dashes?

          Both of these WMP Class IDs(most other WMP embedded codes do not even display in PIE, but these two do) are viewable in regular IE and in PIE, but getting them to actually play in PIE is the challenge.

          Well thanks as always for your interest, thoughts, comments and help!

          Comment


          • #6
            I'm not even sure why you are trying to use js in the first place just to get the video to play which seems like its the root of your problem. Try this
            Code:
            <object width="208" height="231" 
                  classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" 
                  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="url" value="sample.wmv">
                  <param name="uiMode" value="full">
                  <param name="autoStart" value="1">
                  <param name="playCount" value="9999">
                  <param name="AutoRewind" value="1">
                  <param name="volume" value="0">
                  <embed type="application/x-mplayer2" 
                  pluginspage="http://microsoft.com/windows/mediaplayer/en/download/" 
                  showcontrols="1" uimode="full" width="208" height="231" 
                  src="sample.wmv" autostart="1" playcount="9999" autorewind="1" volume="0">
            </object>
            Reason it likely wasn't working with the js was there was no filename parameter. Don't use the js if you don't have to. As you can see you don't.
            Last edited by _Aerospace_Eng_; Oct 14, 2006, 10:28 AM.
            ||||If you are getting paid to do a job, don't ask for help on it!||||

            Comment


            • #7
              Thank you again and if u still have interest thanks. Using the code in the post the player displays/plays fine in reg. IE, but not PIE(PocketPC Internet Explorer). The player doesnt appear at all in PIE.

              Maybe I should create a filename parameter with either code used here www.mubiquity.com or here www.ryanismy.name?

              Cheers, Chaser

              Comment

              Working...
              X