Best way to include windows mediaplayer in a radcontrol app ?

1 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 15 Nov 2009 Link to this post


    I came in difficulties including mediaplayer in FireFox, I need to be able to click on start/stop buttons so I included javascript for this:

                <object id="Player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"   
                standby="Loading Microsoft Windows Media Player components...">  
                    <param name="URL" value=""/>  
                    <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="autoStart" value="-1"/>  
                    <param name="currentMarker" value="0"/>  
                    <param name="invokeURLs" value="-1"/>  
                    <param name="baseURL" value=""/>  
                    <param name="volume" value="50"/>  
                    <param name="mute" value="0"/>  
                    <param name="uiMode" value="full"/>  
                    <param name="stretchToFit" value="1"/>  
                    <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"/>  
                    <param name="_cx" value="11377"/>  
                    <param name="_cy" value="11377"/>  
                <br /> 
                <br /> 
                <input onclick="PauseMe()" type="button" value="Pause" id="btnPause" />   
                <input onclick="StopMe()" type="button" value="Stop" id="btnStop" /> 
                <input onclick="FullScreen()" type="button" value="Full screen" id="FSBUTTON" /> 
                <br /> 
                <br /> 
                <div id="divState">Playstate:  
                <br /> 
                <br /> 
                <div id="divStatus">Status:  
                <br /> 
                <asp:Label id="Label2" Text="FULLSCREEN" runat="server" /><br /> 
    <telerik:RadCodeBlock id="CodeBlock1" runat="server">  
    <script type="text/javascript">  
    var g_bPaused = false; // To track pause button state;  
    // Initialized states.  
    function InitMDP()  
            document.getElementById("btnPause").disabled = true;  
            document.getElementById("btnStop").disabled = true;  
            if (document.getElementById("Player").object.enabled )  
            document.getElementById("Player").uiMode = "none";  
        catch(ex) {  
            if ( document.getElementById("Panel1") )  

    I get an exception in InitMDP "Player" 'has not this property' (but it works in IE), even trying to delay its execution in codebehind using

            protected override void OnPreRender(EventArgs e)  
                string scriptString             = "InitMDP();";  
                if ( HasAjaxManager )  
                    // We must execute this on end of page loading by browser  

    I don't understand, am I stopped by some FF feature ?

    Thanks for idea.


Back to Top