You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
override fun onEnterFullScreen(fullScreenView: View, exitFullScreen: Function0<Unit>) in this method how we can hide MenuButton or their click event is disable from fullscreenview object
#1097
<!--
youTubePlayerView.addFullScreenListener(object : FullScreenListener {
override fun onEnterFullScreen(fullScreenView: View, exitFullScreen: Function0<Unit>) {
// the video will continue playing in fullScreenView
youTubePlayerView.visibility = View.GONE
fullScreenViewContainer.visibility = View.VISIBLE
fullScreenViewContainer.addView(fullScreenView)
// optionally request landscape orientation
// requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
}
override fun onExitFullScreen() {
// the video will continue playing in the player
youTubePlayerView.visibility = View.VISIBLE
fullScreenViewContainer.visibility = View.GONE
fullScreenViewContainer.removeAllViews()
}
})
-->
# Question / Problem
override fun onEnterFullScreen(fullScreenView: View, exitFullScreen: Function0<Unit>){}
// here I want to hide Menu button /overflow button from fullScreenView Object try to finding their button id it is getting null so any other way to hide during full screen when I was exitFullscreen it hides the button but at first time I can see that button because that button object find out menu button on youtubeplayer view when it is ready so I can hide it. but when I goes to fullscreen then it always show it. can you help me to hide it.
### Summary
<!--
I want to hide Menu button always state even if it full screen or not. so first time when YouTube player ready it is hide but when I was going to full screen then it will appear and after I was exit then it will gone. can you guide me to solve this issued because my client want to their YouTube video is not sharing out side the application.
-->
### What I've tried
mBinding.youtubePlayerView.addFullscreenListener(object : FullscreenListener {
override fun onEnterFullscreen(fullscreenView: View, exitFullscreen: () -> Unit) {
isFullscreen = true
// the video will continue playing in fullscreenView
defaultPlayerUiController.showMenuButton(false)
mBinding.youtubePlayerView.setCustomPlayerUi(defaultPlayerUiController.rootView)
menuButton.visibility = View.GONE
mBinding.youtubePlayerView.visibility = View.GONE
val frameMenuButton=fullscreenView.findViewById<ImageView(com.pierfrancescosoffritti.androidyoutubeplayer.core.customui.R.id.extra_views_container).
frameMenuButton.visibility = View.GONE
mBinding.fullScreenViewContainer.visibility = View.VISIBLE
mBinding.fullScreenViewContainer.addView(fullscreenView)
}
override fun onExitFullscreen() {
isFullscreen = false
// the video will continue playing in the player
// defaultPlayerUiController.showMenuButton(false)
//mBinding.youtubePlayerView.setCustomPlayerUi(defaultPlayerUiController.rootView)
mBinding.fullScreenViewContainer.visibility = View.GONE
mBinding.fullScreenViewContainer.removeAllViews()
menuButton.visibility = View.GONE
mBinding.youtubePlayerView.visibility = View.VISIBLE
}
})
The text was updated successfully, but these errors were encountered:
when I am going full screen video then I want to menuButton clickable false or it may be hide. if user is getting exit full screen then However I will get menu button object so then I am able to hide or disable. but First time youtubplayer.toggle full screen it will allow to user click and share that video id . I want to disable their click or menu it in Both case Full screen as well as normal screen. I am sharing a video to be easy to understand what exactly happens
The text was updated successfully, but these errors were encountered: