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

    Modifier and Type
    Method
    Description
    void
    Clears the storage and deletes all entries
    void
    Deletes teh given entry from the storage
    load(String url)
    Loads and returns the playback state for the given given url.
    void
    Persists the given playback state instance
  • Method Details

    • 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