Shaka Player Embedded
|
#include <storage.h>
Classes | |
class | Client |
class | Impl |
Public Member Functions | |
Storage (JsManager *engine, Player *player=nullptr) | |
Storage (Storage &&) | |
~Storage () | |
Storage & | operator= (Storage &&) |
Storage (const Storage &)=delete | |
Storage & | operator= (const Storage &)=delete |
AsyncResults< void > | Initialize (Client *client=nullptr) |
AsyncResults< void > | Destroy () |
AsyncResults< bool > | GetStoreInProgress () |
AsyncResults< std::vector< StoredContent > > | List () |
AsyncResults< void > | Remove (const std::string &content_uri) |
AsyncResults< bool > | RemoveEmeSessions () |
AsyncResults< StoredContent > | Store (const std::string &uri) |
AsyncResults< StoredContent > | Store (const std::string &uri, const std::unordered_map< std::string, std::string > &app_metadata) |
AsyncResults< bool > | Configure (const std::string &name_path, DefaultValueType) |
AsyncResults< bool > | Configure (const std::string &name_path, bool value) |
AsyncResults< bool > | Configure (const std::string &name_path, double value) |
AsyncResults< bool > | Configure (const std::string &name_path, const std::string &value) |
template<typename T , typename = typename std::enable_if< std::is_arithmetic<T>::value>::type> | |
AsyncResults< bool > | Configure (const std::string &name_path, T value) |
AsyncResults< bool > | Configure (const std::string &name_path, const char *value) |
Static Public Member Functions | |
static AsyncResults< bool > | Support (JsManager *engine) |
static AsyncResults< void > | DeleteAll (JsManager *engine) |
Represents a JavaScript shaka.offline.Storage instance. This handles storing, listing, and deleting stored content.
Creates a new Storage instance.
engine | The JavaScript engine to use. |
player | The Player instance to use as a base, can be nullptr. |
Definition at line 105 of file storage.cc.
|
default |
shaka::Storage::~Storage | ( | ) |
Definition at line 110 of file storage.cc.
|
delete |
AsyncResults< bool > shaka::Storage::Configure | ( | const std::string & | name_path, |
DefaultValueType | |||
) |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
Definition at line 138 of file storage.cc.
AsyncResults< bool > shaka::Storage::Configure | ( | const std::string & | name_path, |
bool | value | ||
) |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
Definition at line 143 of file storage.cc.
AsyncResults< bool > shaka::Storage::Configure | ( | const std::string & | name_path, |
double | value | ||
) |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
Definition at line 148 of file storage.cc.
AsyncResults< bool > shaka::Storage::Configure | ( | const std::string & | name_path, |
const std::string & | value | ||
) |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
Definition at line 153 of file storage.cc.
|
inline |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
|
inline |
Sets configuration values for Storage. This is associated with Player.configure and will change the player instance given at initialization. The path is a '.' separated list of names to reach the configuration. For example:
'abr.enabled' => {abr: {enabled: value}}
|
static |
Delete the on-disk storage and all the content it contains. This should not be done in normal circumstances. Only do it when storage is rendered unusable, such as by a version mismatch. No business logic will be run, and licenses will not be released.
Definition at line 120 of file storage.cc.
AsyncResults< void > shaka::Storage::Destroy | ( | ) |
Request that this object be destroyed, releasing all resources and shutting down all operations. Returns a Promise which is resolved when destruction is complete. This Promise should never be rejected.
Definition at line 130 of file storage.cc.
AsyncResults< bool > shaka::Storage::GetStoreInProgress | ( | ) |
Returns true if an asset is currently downloading.
Definition at line 134 of file storage.cc.
AsyncResults< void > shaka::Storage::Initialize | ( | Client * | client = nullptr | ) |
Initializes the Storage object. This must be called before any other methods.
Definition at line 126 of file storage.cc.
AsyncResults< std::vector< StoredContent > > shaka::Storage::List | ( | ) |
Lists all the stored content available. This return array of structures representing all stored content. The offlineUri
member of the structure is the URI that should be given to Player::Load()
to play this piece of content offline.
Definition at line 158 of file storage.cc.
AsyncResults< void > shaka::Storage::Remove | ( | const std::string & | content_uri | ) |
Removes the given stored content. This will also attempt to release the licenses, if any.
Definition at line 162 of file storage.cc.
AsyncResults< bool > shaka::Storage::RemoveEmeSessions | ( | ) |
Removes any EME sessions that were not successfully removed before. This returns whether all the sessions were successfully removed.
Definition at line 166 of file storage.cc.
AsyncResults< StoredContent > shaka::Storage::Store | ( | const std::string & | uri | ) |
Stores the given manifest. If the content is encrypted, and encrypted content cannot be stored on this platform, the Promise will be rejected with error code 6001, REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE.
Definition at line 170 of file storage.cc.
AsyncResults< StoredContent > shaka::Storage::Store | ( | const std::string & | uri, |
const std::unordered_map< std::string, std::string > & | app_metadata | ||
) |
Stores the given manifest. This also stores the given data along side the media data so the app can store additional data.
Definition at line 174 of file storage.cc.
|
static |
Gets whether offline storage is supported. Returns true if offline storage is supported for clear content. Support for offline storage of encrypted content will not be determined until storage is attempted.
Definition at line 114 of file storage.cc.