Class DefaultFullscreenHandler

  • All Implemented Interfaces:
    FullscreenHandler
    Direct Known Subclasses:
    MaximizingFullscreenHandler

    @Deprecated
    public class DefaultFullscreenHandler
    extends java.lang.Object
    implements FullscreenHandler
    Deprecated.
    Handles all fullscreen-related actions:

    • Forcing screen orientation to Landscape on fullscreen.
    • Listening for physical rotation to Landscape.
    • Hiding the System UI.
    • Briefly showing the control bar when the screen is touched in fullscreen.
    • Briefly showing the control bar when the screen is touched in fullscreen.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean mAllowRotation
      Deprecated.
      Used to store whether fullscreen can be exited by rotation.
      protected android.view.View mDecorView
      Deprecated.
      DecorView for the current Activity.
      protected boolean mFullscreen
      Deprecated.
      Current fullscreen state.
      protected JWPlayerView mJWPlayerView
      Deprecated.
      JWPlayerView that this FullscreenHandler is doing fullscreen for.
      protected boolean mUseFullscreenLayoutFlags
      Deprecated.
      Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultFullscreenHandler​(android.app.Activity activity, JWPlayerView jwPlayerView)
      Deprecated.
      Constructs a new DefaultFullscreenHandler.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected void doLayoutChanges​(boolean fullscreen)
      Deprecated.
      Perform the layout changes necessary to make the player fill the screen.
      protected void doRotation​(boolean fullscreen)
      Deprecated.
      Force the screen orientation to change.
      protected void doRotationListener()
      Deprecated.
      Starts a orientation event listener.
      protected void doSystemUiVisibility​(boolean fullscreen)
      Deprecated.
      Handle System UI changes.
      void onAllowRotationChanged​(boolean allowRotation)
      Deprecated.
      Called when the "allow rotation" property of the fullscreen handler is being updated.
      void onDestroy()
      Deprecated.
      Called when this instance of the FullscreenHandler can be destroyed.
      void onFullscreenExitRequested()
      Deprecated.
      Called when the JWPlayerView wants to exit fullscreen.
      void onFullscreenRequested()
      Deprecated.
      Called when the JWPlayerView wants to enter fullscreen.
      void onPause()
      Deprecated.
      Called by the JWPlayerView when the activiy is paused.
      void onResume()
      Deprecated.
      Re-hides the system UI if the app is brought back to the foreground when in fullscreen.
      void setUseFullscreenLayoutFlags​(boolean useFullscreenLayoutFlags)
      Deprecated.
      Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen.
      void updateLayoutParams​(android.view.ViewGroup.LayoutParams layoutParams)
      Deprecated.
      Called by the JWPlayerView when it's LayoutParameters have been updated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mDecorView

        protected android.view.View mDecorView
        Deprecated.
        DecorView for the current Activity.
      • mFullscreen

        protected boolean mFullscreen
        Deprecated.
        Current fullscreen state.
      • mJWPlayerView

        protected JWPlayerView mJWPlayerView
        Deprecated.
        JWPlayerView that this FullscreenHandler is doing fullscreen for.
      • mAllowRotation

        protected boolean mAllowRotation
        Deprecated.
        Used to store whether fullscreen can be exited by rotation.
      • mUseFullscreenLayoutFlags

        protected boolean mUseFullscreenLayoutFlags
        Deprecated.
        Determines whether View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN and View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION flags are used during fullscreen
    • Constructor Detail

      • DefaultFullscreenHandler

        public DefaultFullscreenHandler​(android.app.Activity activity,
                                        JWPlayerView jwPlayerView)
        Deprecated.
        Constructs a new DefaultFullscreenHandler.
        Parameters:
        activity - the activity containing the instance of the JWPlayerView that this FullscreenHandler will be attached too.
        jwPlayerView - the JWPlayerView that will be attached to this fullscreen handler.
    • Method Detail

      • onFullscreenRequested

        public void onFullscreenRequested()
        Deprecated.
        Called when the JWPlayerView wants to enter fullscreen.
        Specified by:
        onFullscreenRequested in interface FullscreenHandler
      • onDestroy

        @CallSuper
        public void onDestroy()
        Deprecated.
        Called when this instance of the FullscreenHandler can be destroyed. Use this event to unregister rotation listeners.
        Specified by:
        onDestroy in interface FullscreenHandler
      • onAllowRotationChanged

        public void onAllowRotationChanged​(boolean allowRotation)
        Deprecated.
        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 interface FullscreenHandler
        Parameters:
        allowRotation - whether the fullscreen handler should listen for rotation changes, true if it should listen for changes.
      • updateLayoutParams

        public void updateLayoutParams​(android.view.ViewGroup.LayoutParams layoutParams)
        Deprecated.
        Called by the JWPlayerView when it's LayoutParameters have been updated. Use these layout parameters when returning from fullscreen.
        Specified by:
        updateLayoutParams in interface FullscreenHandler
        Parameters:
        layoutParams - the new Layout Parameters for the JWPlayerView.
      • doRotation

        protected void doRotation​(boolean fullscreen)
        Deprecated.
        Force the screen orientation to change.

        Default behavior is to force LANDSCAPE/REVERSE_LANDSCAPE when fullscreen == true and PORTRAIT when fullscreen == false.

        Parameters:
        fullscreen - True when entering fullscreen.
      • doSystemUiVisibility

        protected void doSystemUiVisibility​(boolean fullscreen)
        Deprecated.
        Handle System UI changes.

        Default behavior is to hide the system UI when fullscreen == true and show it when fullscreen == false.

        Parameters:
        fullscreen - True when entering fullscreen.
      • doRotationListener

        protected void doRotationListener()
        Deprecated.
        Starts a orientation event listener.
      • doLayoutChanges

        protected void doLayoutChanges​(boolean fullscreen)
        Deprecated.
        Perform the layout changes necessary to make the player fill the screen.
        Parameters:
        fullscreen - True when entering fullscreen.
      • setUseFullscreenLayoutFlags

        public void setUseFullscreenLayoutFlags​(boolean useFullscreenLayoutFlags)
        Deprecated.
        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 interface FullscreenHandler
        Parameters:
        useFullscreenLayoutFlags - true if the FullscreenHandler should use the SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION flag.
      • onResume

        @CallSuper
        public void onResume()
        Deprecated.
        Re-hides the system UI if the app is brought back to the foreground when in fullscreen.
        Specified by:
        onResume in interface FullscreenHandler
      • onPause

        @CallSuper
        public void onPause()
        Deprecated.
        Called by the JWPlayerView when the activiy is paused. Use this to unregister sensor listeners
        Specified by:
        onPause in interface FullscreenHandler