Video Pausing With Error "unauthorized Overlay"
Solution 1:
Taken from the documentation
FULLSCREEN_FLAG_CUSTOM_LAYOUT
disables the default fullscreen layout handler, enabling you to control the transition to fullscreen layout manually.
As you see, setting that flag leaves to you the task of handling the UI elements' visibility, in particular those belonging to the System UI (status bar, navigation bar).
For this reason, if you fail to hide the status bar, the YouTube player will detect that a view is being displayed over it and will therefore throw that warning.
You can try with one of the following additional flags
FULLSCREEN_FLAG_ALWAYS_FULLSCREEN_IN_LANDSCAPE
: causes the player to automatically enter fullscreen whenever the device enters landscape orientation.
FULLSCREEN_FLAG_CONTROL_ORIENTATION
: enables automatic control of the orientation.
FULLSCREEN_FLAG_CONTROL_SYSTEM_UI
: enables automatic control of system UI.
FULLSCREEN_FLAG_CUSTOM_LAYOUT
: disables the default fullscreen layout handler, enabling you to control the transition to fullscreen layout manually.
or, if you actually need to have manual control over the System UI, keep using the custom layout flag and be sure to handle the UI elements' visibility.
Post a Comment for "Video Pausing With Error "unauthorized Overlay""