Class MaximizingFullscreenHandler
- java.lang.Object
-
- com.longtailvideo.jwplayer.fullscreen.DefaultFullscreenHandler
-
- com.longtailvideo.jwplayer.fullscreen.MaximizingFullscreenHandler
-
- All Implemented Interfaces:
FullscreenHandler
public class MaximizingFullscreenHandler extends DefaultFullscreenHandler
A FullscreenHandler that works by setting the LayoutParams on the JWPlayerView to MATCH_PARENT. This FullscreenHandler could be used as an alternative to the DefaultFullscreenHandler.Note that this FullscreenHandler may not work correctly in every layout situation.
-
-
Field Summary
-
Fields inherited from class com.longtailvideo.jwplayer.fullscreen.DefaultFullscreenHandler
mAllowRotation, mDecorView, mFullscreen, mJWPlayerView, mUseFullscreenLayoutFlags
-
-
Constructor Summary
Constructors Constructor Description MaximizingFullscreenHandler(android.app.Activity activity, JWPlayerView jwPlayerView)
Constructs a new DefaultFullscreenHandler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doLayoutChanges(boolean fullscreen)
Perform the layout changes necessary to make the player fill the screen.protected static android.view.ViewGroup.LayoutParams
fullscreenLayoutParams(android.view.ViewGroup.LayoutParams srcParams)
Creates a clone of srcParams with the width and height set to MATCH_PARENT.void
updateLayoutParams(android.view.ViewGroup.LayoutParams layoutParams)
Called by the JWPlayerView when it's LayoutParameters have been updated.-
Methods inherited from class com.longtailvideo.jwplayer.fullscreen.DefaultFullscreenHandler
doRotation, doRotationListener, doSystemUiVisibility, onAllowRotationChanged, onDestroy, onFullscreenExitRequested, onFullscreenRequested, onPause, onResume, setUseFullscreenLayoutFlags
-
-
-
-
Constructor Detail
-
MaximizingFullscreenHandler
public MaximizingFullscreenHandler(android.app.Activity activity, JWPlayerView jwPlayerView)
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
-
doLayoutChanges
protected void doLayoutChanges(boolean fullscreen)
Perform the layout changes necessary to make the player fill the screen.- Overrides:
doLayoutChanges
in classDefaultFullscreenHandler
- Parameters:
fullscreen
- True when entering fullscreen.
-
updateLayoutParams
public void updateLayoutParams(android.view.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
- Overrides:
updateLayoutParams
in classDefaultFullscreenHandler
- Parameters:
layoutParams
- the new Layout Parameters for the JWPlayerView.
-
fullscreenLayoutParams
protected static android.view.ViewGroup.LayoutParams fullscreenLayoutParams(android.view.ViewGroup.LayoutParams srcParams)
Creates a clone of srcParams with the width and height set to MATCH_PARENT.- Parameters:
srcParams
-- Returns:
- LayoutParams in fullscreen.
-
-