How to Hide the Controls and then bring them back when you want them?

4 posts, 0 answers
  1. Kavita
    Kavita avatar
    5 posts
    Member since:
    Apr 2009

    Posted 01 Jul 2009 Link to this post


    I was wondering when a video player is first played on a site, can it just play a video with no controls(the bar that has play, stop, playlist buttons, etc.). The video takes up the entire space of the control when it is played. But say a user click on top of the video, the controls appear. And when they leave the area they click on, the controls disappear and once again, the video plays fully in the control. Is that possible?

    Thank you,
  2. Kiril Stanoev
    Kiril Stanoev avatar
    1508 posts

    Posted 02 Jul 2009 Link to this post

    Hello Kavita,

    One way is to change RadMediaPlayer's ControlTemplate thus removing the controls.
    The other way is much shorter. As soon as the Page loads, you can set  the RadMediaPlayer.IsFullScreen to true. This way, every time the user enters RadMediaPlayer with his/her mouse the controls will appear. As soon as he/she leaves, the controls will disappear.
    I have created a sample project demonstrating this functionality. Have a look at it and let me know how it works for you.

    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. John
    John avatar
    8 posts
    Member since:
    Aug 2008

    Posted 07 Feb 2010 Link to this post


    When I run your example it works great with one major exception. You state that "every time the user enters RadMediaPlayer with his/her mouse the controls will appear". This isn't working in my code or yours. Any thoughts?

    I should be more specific here. When I start my SL page with the RadMediaPlayer in it, the controls show and work fine. When I click on the Full Screen icon, it goes to full screen and the controls all disappear. Once I mouse over it, the controls don't return. The only way to get them to come back is to exit full screen. Interestingly enough, it works on the Silverlight demo page. Perhaps you can look at the code there? Your help is appreciated!
  5. Miro Miroslavov
    Miro Miroslavov avatar
    588 posts

    Posted 08 Feb 2010 Link to this post

    Hi John,

    The problem was that we hide/show the buttons when you move the mouse over the MediaElement (The video placeholder), not the whole player. I've attached a project with the functionality you needed. You can change button states in different scenarios, so show/hide them wherever you want to.
    Let us know If you have any other questions or problems.

    All the best,
    Miro Miroslavov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
Back to Top