Package com.jwplayer.pub.api
Enum Class FullscreenExitReason
- All Implemented Interfaces:
Serializable,Comparable<FullscreenExitReason>,Constable
Constants indicating why the player left fullscreen, delivered with
FullscreenExitReasonEvent.
The full set of constants is shared with the iOS SDK so both platforms describe the same
situations with the same wire names. Android does not currently exit fullscreen in every one of
those situations, so some constants are reserved and are never reported by the player today;
each is marked below. Treat any unhandled value as equivalent to UNKNOWN rather than
switching exhaustively, so a reserved reason becoming live is not a breaking change.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReserved.Reserved.Reserved.Fullscreen was left because of a call toJWPlayer.setFullscreen, i.e.The user rotated the device out of the fullscreen orientation.Reserved.Reserved.Fallback value: returned byfrom(String)for null or unrecognized input, and the value of an unset exit reason.Reserved.The user tapped a dedicated close/exit-fullscreen control, such as the "X" over the center controls, the "Exit Fullscreen" button in the playlist overlay, or the close control shown during an ad.The user tapped the fullscreen toggle, which happened to be in its "on" state. -
Method Summary
Modifier and TypeMethodDescriptionbooleanequalsName(String otherName) static FullscreenExitReasontoString()static FullscreenExitReasonReturns the enum constant of this class with the specified name.static FullscreenExitReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USER_TAPPED_DISMISS_BUTTON
The user tapped a dedicated close/exit-fullscreen control, such as the "X" over the center controls, the "Exit Fullscreen" button in the playlist overlay, or the close control shown during an ad. -
USER_TAPPED_TOGGLE_BUTTON
The user tapped the fullscreen toggle, which happened to be in its "on" state. -
USER_SWIPED_DOWN
Reserved. The SDK has no swipe-to-dismiss gesture, so this is never reported. -
ORIENTATION_CHANGE
The user rotated the device out of the fullscreen orientation. Reported when the SDK's default fullscreen handler detects that the rotation was performed by the user rather than requested by the SDK — including when the app itself reacts toonConfigurationChangedby callingJWPlayer.setFullscreen— or when the exit is attributed explicitly viaJWPlayer.setFullscreen(boolean, boolean, FullscreenExitReason). Apps replacing the default fullscreen handler must use the explicit overload for rotations to be reported as this reason. -
APP_BACKGROUNDED
Reserved. Backgrounding pauses playback but does not leave fullscreen, so this is never reported. -
PICTURE_IN_PICTURE_INITIATED
Reserved. Entering Picture-in-Picture does not leave fullscreen, so this is never reported. -
CONTENT_COMPLETE
Reserved. Completing playback does not leave fullscreen, so this is never reported. -
AD_BREAK_END
Reserved. The end of an ad break does not leave fullscreen, so this is never reported. -
PLAYBACK_ERROR
Reserved. A playback error does not leave fullscreen, so this is never reported. -
EXTERNAL
Fullscreen was left because of a call toJWPlayer.setFullscreen, i.e. the request came from outside the player UI. An external call that the SDK detects was prompted by a user-performed device rotation is reported asORIENTATION_CHANGEinstead. -
UNKNOWN
Fallback value: returned byfrom(String)for null or unrecognized input, and the value of an unset exit reason. Not currently reported by the player itself.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
equalsName
-
toString
- Overrides:
toStringin classEnum<FullscreenExitReason>
-
from
- Parameters:
value- a wire name as returned bytoString()- Returns:
- the matching reason, or
UNKNOWNifvalueis null or unrecognized
-