Package com.jwplayer.pub.api.fullscreen
Class ExtensibleFullscreenHandler
java.lang.Object
com.jwplayer.pub.api.fullscreen.ExtensibleFullscreenHandler
- All Implemented Interfaces:
FullscreenHandler
-
Constructor Summary
ConstructorsConstructorDescriptionExtensibleFullscreenHandler
(LayoutDelegate layoutDelegate, DeviceOrientationDelegate deviceOrientationDelegate, SystemUiDelegate systemUiDelegate) -
Method Summary
Modifier and TypeMethodDescriptionvoid
onAllowFullscreenPortraitChanged
(boolean allowFullscreenPortrait) Called when the `allowFullscreenPortrait` property is changed on the player, and then passed down to the FullscreenHandler.void
onAllowRotationChanged
(boolean allowRotation) Called when the "allow rotation" property of the fullscreen handler is being updated.void
Called when the JWPlayerView wants to exit fullscreen.void
Called when the JWPlayerView wants to enter fullscreen.void
setUseFullscreenLayoutFlags
(boolean useFullscreenLayoutFlags) Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen.void
updateLayoutParams
(ViewGroup.LayoutParams layoutParams) Called by the JWPlayerView when it's LayoutParameters have been updated.
-
Constructor Details
-
ExtensibleFullscreenHandler
public ExtensibleFullscreenHandler(LayoutDelegate layoutDelegate, DeviceOrientationDelegate deviceOrientationDelegate, SystemUiDelegate systemUiDelegate)
-
-
Method Details
-
onFullscreenRequested
public void onFullscreenRequested()Called when the JWPlayerView wants to enter fullscreen.- Specified by:
onFullscreenRequested
in interfaceFullscreenHandler
-
onFullscreenExitRequested
public void onFullscreenExitRequested()Called when the JWPlayerView wants to exit fullscreen.- Specified by:
onFullscreenExitRequested
in interfaceFullscreenHandler
-
onAllowRotationChanged
public void onAllowRotationChanged(boolean allowRotation) Called when the "allow rotation" property of the fullscreen handler is being updated. Use this to enable or disable your rotation listener.- Specified by:
onAllowRotationChanged
in interfaceFullscreenHandler
- Parameters:
allowRotation
- whether the fullscreen handler should listen for rotation changes, true if it should listen for changes.
-
onAllowFullscreenPortraitChanged
public void onAllowFullscreenPortraitChanged(boolean allowFullscreenPortrait) Description copied from interface:FullscreenHandler
Called when the `allowFullscreenPortrait` property is changed on the player, and then passed down to the FullscreenHandler.Use this to update the handler to be respective of fullscreen portrait triggered by player
- Specified by:
onAllowFullscreenPortraitChanged
in interfaceFullscreenHandler
- Parameters:
allowFullscreenPortrait
- the state of allowing fullscreen portrait
-
updateLayoutParams
public void updateLayoutParams(ViewGroup.LayoutParams layoutParams) Called by the JWPlayerView when it's LayoutParameters have been updated. Use these layout parameters when returning from fullscreen.- Specified by:
updateLayoutParams
in interfaceFullscreenHandler
- Parameters:
layoutParams
- the new Layout Parameters for the JWPlayerView.
-
setUseFullscreenLayoutFlags
public void setUseFullscreenLayoutFlags(boolean useFullscreenLayoutFlags) Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen.These flags create an issue on Android 4.1, 4.2, and 4.3 devices when using the SupportActionBar, set this to false to disable using these flags.
- Specified by:
setUseFullscreenLayoutFlags
in interfaceFullscreenHandler
- Parameters:
useFullscreenLayoutFlags
- true if the FullscreenHandler should use the SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION flag.
-