Package com.castlabs.android.player
Interface PlaybackStateStorage
-
public interface PlaybackStateStorageImplementations of this interface offer the basic infrastructure to load and save instances ofPlayerConfig- Since:
- 1.4.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the storage and deletes all entriesvoiddelete(PlayerConfig state)Deletes teh given entry from the storagePlayerConfigload(String url)Loads and returns the playback state for the given given url.voidsave(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 ExceptionPersists 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 ExceptionDeletes teh given entry from the storage- Parameters:
state- the entry- Throws:
Exception- in case of an error
-
-