Package com.castlabs.android.player

## Interface PlaybackStateStorage

-     public interface PlaybackStateStorage

  Implementations of this interface offer the basic infrastructure to load and save instances of `PlayerConfig`
  Since:
    1.4.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `clear()` | Clears the storage and deletes all entries
    `void` | `delete​(PlayerConfig state)` | Deletes teh given entry from the storage
    `PlayerConfig` | `load​(String url)` | Loads and returns the playback state for the given given url.
    `void` | `save​(PlayerConfig state)` | Persists the given playback state instance

- - ### Method Detail

    - #### load

          @NonNull
          PlayerConfig load​(@NonNull
                            String url)
                     throws Exception

      Loads and returns the playback state for the given given url.
      Parameters:
        `url` - the playback content url
      Returns:
        the playback state for the given url or a new initial state
      Throws:
        `Exception` - in case an error occurred while loading the playback state instance

    - #### save

          void save​(@NonNull
                    PlayerConfig state)
             throws Exception

      Persists the given playback state instance
      Parameters:
        `state` - the state instance
      Throws:
        `Exception` - in case an error occurred while persisting

    - #### delete

          void delete​(@NonNull
                      PlayerConfig state)
               throws Exception

      Deletes teh given entry from the storage
      Parameters:
        `state` - the entry
      Throws:
        `Exception` - in case of an error

    - #### clear

          void clear()
              throws Exception

      Clears the storage and deletes all entries
      Throws:
        `Exception` - in case of an error while deleting