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
Modifier and TypeMethodDescriptionvoidclear()Clears the storage and deletes all entriesvoiddelete(PlayerConfig state) Deletes teh given entry from the storageLoads and returns the playback state for the given given url.voidsave(PlayerConfig state) Persists the given playback state instance
-
Method Details
-
load
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
Persists the given playback state instance- Parameters:
state- the state instance- Throws:
Exception- in case an error occurred while persisting
-
delete
Deletes teh given entry from the storage- Parameters:
state- the entry- Throws:
Exception- in case of an error
-
clear
Clears the storage and deletes all entries- Throws:
Exception- in case of an error while deleting
-