Enum Class FullscreenExitReason

java.lang.Object
java.lang.Enum<FullscreenExitReason>
com.jwplayer.pub.api.FullscreenExitReason
All Implemented Interfaces:
Serializable, Comparable<FullscreenExitReason>, Constable

public enum FullscreenExitReason extends Enum<FullscreenExitReason>
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.

  • Enum Constant Details

    • USER_TAPPED_DISMISS_BUTTON

      public static final FullscreenExitReason 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

      public static final FullscreenExitReason USER_TAPPED_TOGGLE_BUTTON
      The user tapped the fullscreen toggle, which happened to be in its "on" state.
    • USER_SWIPED_DOWN

      public static final FullscreenExitReason USER_SWIPED_DOWN
      Reserved. The SDK has no swipe-to-dismiss gesture, so this is never reported.
    • ORIENTATION_CHANGE

      public static final FullscreenExitReason 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 to onConfigurationChanged by calling JWPlayer.setFullscreen — or when the exit is attributed explicitly via JWPlayer.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

      public static final FullscreenExitReason APP_BACKGROUNDED
      Reserved. Backgrounding pauses playback but does not leave fullscreen, so this is never reported.
    • PICTURE_IN_PICTURE_INITIATED

      public static final FullscreenExitReason PICTURE_IN_PICTURE_INITIATED
      Reserved. Entering Picture-in-Picture does not leave fullscreen, so this is never reported.
    • CONTENT_COMPLETE

      public static final FullscreenExitReason CONTENT_COMPLETE
      Reserved. Completing playback does not leave fullscreen, so this is never reported.
    • AD_BREAK_END

      public static final FullscreenExitReason AD_BREAK_END
      Reserved. The end of an ad break does not leave fullscreen, so this is never reported.
    • PLAYBACK_ERROR

      public static final FullscreenExitReason PLAYBACK_ERROR
      Reserved. A playback error does not leave fullscreen, so this is never reported.
    • EXTERNAL

      public static final FullscreenExitReason EXTERNAL
      Fullscreen was left because of a call to JWPlayer.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 as ORIENTATION_CHANGE instead.
    • UNKNOWN

      public static final FullscreenExitReason UNKNOWN
      Fallback value: returned by from(String) for null or unrecognized input, and the value of an unset exit reason. Not currently reported by the player itself.
  • Method Details

    • values

      public static FullscreenExitReason[] 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

      public static FullscreenExitReason valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • equalsName

      public boolean equalsName(String otherName)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<FullscreenExitReason>
    • from

      public static FullscreenExitReason from(String value)
      Parameters:
      value - a wire name as returned by toString()
      Returns:
      the matching reason, or UNKNOWN if value is null or unrecognized