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

Initially hide mediaplayer controls

2 Answers 133 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 19 Mar 2018, 03:24 AM

Hi,

Sorry if this has been asked elsewhere, I cannot find any answers on this topic..

I am using a media player in a dockzone control which works great.  The only issue I have is the player, which is set to autoplay, shows the titlebar and play controls automatically on start and only disappears when the user hovers over the control and then off it.  I would like the player ONLY to show the controls when the user hovers over it (ie do not show it until they want to control the video).

Thanks!

2 Answers, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 19 Mar 2018, 03:32 AM

Typically, I solved it soon after posting the question.  Not sure where I found this code (sorry I did not write this) but here is what I users to resolve the auto-hide on play:

in the control: 

OnClientReady = "playerReady"

and then in javascript:

var isResponse = false;
function playerReady(sender, args) {
   if (!isResponse) {
      isResponse = true;
      sender.titlebar.slideUp();
      sender.toolbar.hide();
   }
}

Hope that helps someone else also!  Thanks to whoever originally posted that.

0
Eyup
Telerik team
answered on 21 Mar 2018, 07:33 AM
Hello Alex,

Thank you for sharing this with our community. Here is the original project where you could have found this:
https://www.telerik.com/forums/add-banner-to-video-on-playlist-in-code-behind#aORyKyoi4kicrYgpagmB1A

Regards,
Eyup
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
MediaPlayer
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or