Package com.jwplayer.pub.api.fullscreen
Interface FullscreenHandler
- All Known Implementing Classes:
ExtensibleFullscreenHandler
public interface FullscreenHandler
-
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 flags) Called when JWPlayerView.setUseFullscreenLayoutFlags(boolean) is called.void
updateLayoutParams
(ViewGroup.LayoutParams layoutParams) Called by the JWPlayerView when it's LayoutParameters have been updated.
-
Method Details
-
onFullscreenRequested
void onFullscreenRequested()Called when the JWPlayerView wants to enter fullscreen. -
onFullscreenExitRequested
void onFullscreenExitRequested()Called when the JWPlayerView wants to exit fullscreen. -
onAllowRotationChanged
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.- Parameters:
allowRotation
- whether the fullscreen handler should listen for rotation changes, true if it should listen for changes.
-
onAllowFullscreenPortraitChanged
void onAllowFullscreenPortraitChanged(boolean allowFullscreenPortrait) 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
- Parameters:
allowFullscreenPortrait
- the state of allowing fullscreen portrait
-
updateLayoutParams
void updateLayoutParams(ViewGroup.LayoutParams layoutParams) Called by the JWPlayerView when it's LayoutParameters have been updated. Use these layout parameters when returning from fullscreen.- Parameters:
layoutParams
- the new Layout Parameters for the JWPlayerView.
-
setUseFullscreenLayoutFlags
void setUseFullscreenLayoutFlags(boolean flags) Called when JWPlayerView.setUseFullscreenLayoutFlags(boolean) is called. Use this in your fullscreen implementation to determine whether to use theandroid.view.View.SYSTEM_UI_FLAG_FULLSCREEN
andandroid.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
flags in calls toViewGroup#setSystemUiVisibility(int)
.- Parameters:
flags
- true if the FullscreenHandler should use the SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION flag.
-