halilozercan / BetterVideoPlayer

Video playback on Android, made better in Kotlin, wrapping around the stock MediaPlayer API.
287 stars 95 forks source link

Show controls doesn't work. #30

Open ajaystha005 opened 7 years ago

ajaystha005 commented 7 years ago

I am trying to show controls on start of the video. But it automatically hides. Is there is any fix around? mPlayer.showControls();

-###### Include the following:

halilozercan commented 7 years ago

try mPlayer.setHideControlsOnPlay(false); By default, video player hides controls after play. This method changes that behavior. It is also available by xml.

ajaystha005 commented 7 years ago

I tried that. that doesn't work. the Controls still are hidden. Need to touch to show :(

ajaystha005 commented 7 years ago

private void setUpPlayer() { mPlayer = mBinding.player; mPlayer.setCallback(this); mPlayer.setHideControlsOnPlay(false); mPlayer.setAutoPlay(true); } @Override public void playVideo(Uri url) { mPlayer.setSource(url); }