Package com.castlabs.android.player

## Enum PlayerController.State

- java.lang.Object
- - java.lang.Enum<PlayerController.State>
  - - com.castlabs.android.player.PlayerController.State

- All Implemented Interfaces:
    `Serializable`, `Comparable<PlayerController.State>`
  Enclosing class:
    PlayerController

      public static enum PlayerController.State
      extends Enum<PlayerController.State>

  Represents states of the player backend.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `Buffering` | The player does not have enough data to start playing and is buffering now.
    `Finished` | Playback finished successfully and the end of the data stream was reached.
    `Idle` | The player controller is not prepared or preparing and no content is loaded This is the initial player state and the state the player returns to after it is destroyed.
    `Pausing` | The player is prepared and has enough data to start playback immediately but is currently paused
    `Playing` | The player is prepared and currently playing
    `Preparing` | The player started loading content after `PlayerController.open(PlayerConfig)` was called and is loading the content meta-data.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static PlayerController.State` | `valueOf​(String name)` | Returns the enum constant of this type with the specified name.
    `static PlayerController.State[]` | `values()` | Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### Idle

          public static final PlayerController.State Idle

      The player controller is not prepared or preparing and no content is loaded This is the initial player state and the state the player returns to after it is destroyed. This state is usually followed by the `Preparing` state.

    - #### Preparing

          public static final PlayerController.State Preparing

      The player started loading content after `PlayerController.open(PlayerConfig)` was called and is loading the content meta-data.

    - #### Buffering

          public static final PlayerController.State Buffering

      The player does not have enough data to start playing and is buffering now. This state is usually reached after the player finished `Preparing`, the position was changed and the player is seeking, or a buffer under-run occurred.

    - #### Pausing

          public static final PlayerController.State Pausing

      The player is prepared and has enough data to start playback immediately but is currently paused

    - #### Playing

          public static final PlayerController.State Playing

      The player is prepared and currently playing

    - #### Finished

          public static final PlayerController.State Finished

      Playback finished successfully and the end of the data stream was reached.

  - ### Method Detail

    - #### values

          public static PlayerController.State[] 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 (PlayerController.State c : PlayerController.State.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static PlayerController.State 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