Web Analytics Made Easy -
StatCounter Windows Media Player Controls - CodingForum

Announcement

Collapse
No announcement yet.

Windows Media Player Controls

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

  • Windows Media Player Controls

    Hey,

    I'm using the following javascript to allow buttons to peform controls like Play and Stop rather than an embedded windows media player box.

    Code:
    <SCRIPT>
    <!--
       function play()
       {
           fmplayer.controls.play();
       }
    
       function pause()
       {
           fmplayer.controls.stop();
       }
    -->
    </SCRIPT>
    Code:
    <INPUT TYPE="BUTTON" NAME="BtnStop" VALUE="Stop" OnClick="pause()">
    This works fine for me, in IE and FF. Meanwhile, my friend has Mozilla Firefox BETA 2 and it doesn't.

    Is there a solution to this?

    Thanks in advanced,
    Olii

  • #2
    It really shouldn't work in firefox at all without activex. Do you have activex installed on your version of Firefox? Again you seem to be coding for beta apps. Not much you can do about them yet. Code for whats available.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      Is there an alternative to these buttons? Perhaps another method of doing it.

      Comment


      • #4
        Not using windows media player. Are you playing songs or videos? A flash player might be better to use but it sounds like you want visualizations. They also won't show in Firefox. Its an IE only thing.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment


        • #5
          It's only being used to stream a single document (a radio). Both the windows media player visualizations and controls work for me in Mozilla, but somehow they will probably be because I have a plugin for something like this.

          I have no idea how to build a flash player.

          Look at www.habboremix.net. They have a radio which can be paused and continued with image-controls. How are they doing it?

          Comment


          • #6
            I went there using Firefox and got this
            Originally posted by habbremix.net
            HabboRemix requires you to use Internet Explorer to browse our site. Without it the majority of the features will not work. Therefore, please close this window and load www.HabboRemix.net in your Internet Explorer program instead.

            Sorry for any problems caused!
            ||||If you are getting paid to do a job, don't ask for help on it!||||

            Comment


            • #7
              Oh yeah! How could I forget that. In that case, go to www.habbofm.co.uk - they have a Windows Media player object and it works fine for me and my friend in Mozilla, without the plugin.

              Comment


              • #8
                This is what they are using
                Code:
                     <object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" name="player" width="158" height="33" standby="Loading" CODEBASE="CODEBASE=http:/activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" align="center">
                    <param name="url" value="http://radio.habbofm.co.uk/listen.php?type=asx" ref>
                    <param name="autostart" value="-1">
                    <param name="uimode" value="mini">
                
                    <param name="rate" value="1">
                	<param name="balance" value="0">
                	<param name="currentPosition" value="0">
                	<param name="defaultFrame" value>
                	<param name="playCount" value="1">
                	<param name="currentMarker" value="0">
                	<param name="invokeURLs" value="-1">
                	<param name="baseURL" value>
                	<param name="volume" value="70">
                
                	<param name="mute" value="0">
                	<param name="stretchToFit" value="0">
                	<param name="windowlessVideo" value="0">
                	<param name="enabled" value="-1">
                	<param name="enableContextMenu" value="-1">
                	<param name="fullScreen" value="0">
                	<param name="SAMIStyle" value>
                	<param name="SAMILang" value>
                	<param name="SAMIFilename" value>
                
                	<param name="captioningID" value>
                	<param name="enableErrorDialogs" value="0">
                    <embed src="habbofm.asx" width="180" height="35" autostart="true" controls="playbutton" showstatusbar="false" url="http://radio.habbofm.co.uk/listen.php?type=asx" autoplay="true" uimode="mini"></object>
                They have an asx file that is played in that player. It contains this
                Code:
                <ASX version = "3.0"> 
                  <Entry> 
                     <TITLE>HabboFM.co.uk - Habbo's Best for Music Pollution</TITLE> 
                     <AUTHOR>HabboFM.co.uk - International Radio</AUTHOR> 
                     <COPYRIGHT>Copyright&#169; 2006+</COPYRIGHT> 
                     <!--
                      <Logo href = "http://www.habbofm.co.uk/images/links/habbofm-logo.gif" Style = "MARK" /> 
                     --> 
                     <Ref href = "http://radio.habbofm.co.uk:9022" /> 
                
                     <BANNER HREF="http://www.habbofm.co.uk/images/links/habbofm-logo.gif"> 
                        <ABSTRACT>Click here to visit HabboFM</ABSTRACT> 
                        <MOREINFO HREF="http://www.habbofm.co.uk" /> 
                     </BANNER> 
                  </Entry> 
                </ASX>
                That ref url in there is a streaming song server.
                ||||If you are getting paid to do a job, don't ask for help on it!||||

                Comment


                • #9
                  Yes, that's exactly what I'm using. I just sent it to proove that it can be done in Mozilla. That is the exact code I am using, apart from it is showing the visulizations only and it works perfect. How can I do the play etc controls with JavaScript though?

                  Comment


                  • #10
                    You can't at least not in Firefox. Firefox needs the activex plugin. Just live with the normal controls.
                    ||||If you are getting paid to do a job, don't ask for help on it!||||

                    Comment


                    • #11
                      I think I will be doing that. I only wanted to do this so it would nicely fit into my websites template.

                      Comment

                      Working...
                      X