Click here to Skip to main content
15,881,413 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
How to disable the media player controls such as play button,mute button etc...
this is my code

XML
<object height="320px" width="240px" type ="video/x-ms-wmv">
   <param name="src" value="video\video.mpeg" />
   <param name="AutoStart" value="0" />
   <param name="ShowControls" value="false" />
   <param name="ShowStatusBar" value="false" />
  <param name="ShowDisplay" value="false" />
   </object>



I want to display only video...... because i am using load button,play button,pause button and stop button

or if i pause the video get the (current) duration of the video in text box



I am using play button to play the video


C#
function Play ()
       {


       
                x = Player.playState;

                if (x == 2) {

                   Player.controls.play();



                }else{


                   Player.uiMode = "none"; 
                   Player.URL = "video\\Traffic motion detector.avi";

                }

       }


if i press the play button the media player controls are disabled....but i want to disable the media player controls when the page load.....
pls hlp me.....
Posted
Updated 10-Feb-12 1:06am
v5

Use <param name="uiMode" value="none"/> BTW ShowControls = false work fine. What behavior do you want actually?
 
Share this answer
 
v3
Comments
saravana__ 7-Feb-12 6:23am    
this code not works for me........
saravana__ 8-Feb-12 5:15am    
i want to disable all controls in media player .....because i am using button controls to play,pause and stop video....
Prerak Patel 8-Feb-12 10:59am    
With showcontrol set to false, I can see only video part in IE. No controls are visible anyway, then what is the benefit of disabling them?
saravana__ 10-Feb-12 6:59am    
But i am using google chrome to run the project....
disable medial player controls in asp.net web page

C#
window.onload = function loadw()
            
            { 
             Player.uiMode="none";
            }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900