Enum PlayerState

    • Enum Constant Detail

      • LOADING

        public static final PlayerState LOADING
        The player is negotiating with the server about available formats, and should move on to buffering soon. If the broadcast is not immediately available (for example if the video needs to be converted to another format), the player will wait and continue automatically when the broadcast becomes available.
      • BUFFERING

        public static final PlayerState BUFFERING
        Playback is interrupted and the player is buffering data. This intermittent state can be considered a sub-state of PLAYING, as the player is not considered PAUSED. It can occur at the beginning and in the middle of playback, and the player should normally transition to PLAYING automatically.
      • PLAYING

        public static final PlayerState PLAYING
        The player is actively playing a stream.
      • PAUSED

        public static final PlayerState PAUSED
        The player is paused. Use start() to resume playback.
      • COMPLETED

        public static final PlayerState COMPLETED
        The player reached the end of the loaded broadcast successfully. All buffered audio and video should now have finished playing. If the loaded broadcast is an archived broadcast, it is possible to replay using start(). If the loaded broadcast was live, this is practically the final state. Use close() to free all system resources. If playback of the archived version is desired, use BroadcastPlayer(...) to load the archived broadcast.
      • ERROR

        public static final PlayerState ERROR
        Playback failed, likely due to a network error. This is a final state. Use close() to free all system resources.
      • CLOSED

        public static final PlayerState CLOSED
        This BroadcastPlayer instance has been closed and all system resources freed. The instance should no longer be used.
    • Method Detail

      • values

        public static PlayerState[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PlayerState c : PlayerState.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PlayerState valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null