This is a migrated thread and some comments may be shown as answers.

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

3 Answers 150 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Kavita
Top achievements
Rank 1
Kavita asked on 01 Jul 2009, 08:42 PM
Hi,

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,
KP

3 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 02 Jul 2009, 02:45 PM
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.

Greetings,
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.
0
John
Top achievements
Rank 1
answered on 07 Feb 2010, 06:17 AM
Kiril,

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!
0
Miro Miroslavov
Telerik team
answered on 08 Feb 2010, 06:50 PM
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.
Tags
MediaPlayer
Asked by
Kavita
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
John
Top achievements
Rank 1
Miro Miroslavov
Telerik team
Share this question
or