Shaka Player Embedded
Instance Methods | Properties | List of all members
ShakaPlayerStorage Class Reference

#import <ShakaPlayerStorage.h>

Inheritance diagram for ShakaPlayerStorage:

Instance Methods

(nullable instancetype) - initWithError:
 
(nullable instancetype) - initWithPlayer:andError:
 
(void) - destroyWithBlock:
 
(void) - listWithBlock:
 
(void) - remove:withBlock:
 
(void) - removeEmeSessionsWithBlock:
 
(void) - store:withBlock:
 
(void) - store:withAppMetadata:andBlock:
 
(void) - configure:withBool:
 
(void) - configure:withDouble:
 
(void) - configure:withString:
 
(void) - configureWithDefault:
 

Properties

id< ShakaPlayerStorageClient > client
 
BOOL storeInProgress
 

Detailed Description

Represents a JavaScript shaka.offline.Storage instance. This handles storing, listing, and deleting stored content.

Definition at line 49 of file ShakaPlayerStorage.h.

Method Documentation

§ configure:withBool:()

- (void) configure: (const NSString *)  namePath
withBool: (BOOL)  value 

Applies a configuration.

Parameters
namePathThe path of the parameter to configure. I.e. "manifest.dash.defaultPresentationDelay" corresponds to {manifest: {dash: {defaultPresentationDelay: your value}}}
valueThe value you wish to assign.

Definition at line 152 of file ShakaPlayerStorage.mm.

§ configure:withDouble:()

- (void) configure: (const NSString *)  namePath
withDouble: (double)  value 

Applies a configuration.

Parameters
namePathThe path of the parameter to configure. I.e. "manifest.dash.defaultPresentationDelay" corresponds to {manifest: {dash: {defaultPresentationDelay: your value}}}
valueThe value you wish to assign.

Definition at line 156 of file ShakaPlayerStorage.mm.

§ configure:withString:()

- (void) configure: (const NSString *)  namePath
withString: (const NSString *)  value 

Applies a configuration.

Parameters
namePathThe path of the parameter to configure. I.e. "manifest.dash.defaultPresentationDelay" corresponds to {manifest: {dash: {defaultPresentationDelay: your value}}}
valueThe value you wish to assign.

Definition at line 160 of file ShakaPlayerStorage.mm.

§ configureWithDefault:()

- (void) configureWithDefault: (const NSString *)  namePath

Returns a configuration to the default value.

Parameters
namePathThe path of the parameter to configure. I.e. "manifest.dash.defaultPresentationDelay" corresponds to {manifest: {dash: {defaultPresentationDelay: your value}}}

Definition at line 164 of file ShakaPlayerStorage.mm.

§ destroyWithBlock:()

- (void) destroyWithBlock: (ShakaPlayerAsyncBlock block

Request that this object be destroyed, releasing all resources and shutting down all operations.

Definition at line 119 of file ShakaPlayerStorage.mm.

§ initWithError:()

- (nullable instancetype) initWithError: (init())  NS_SWIFT_NAME

§ initWithPlayer:andError:()

- (nullable instancetype) initWithPlayer: (ShakaPlayer *_Nullable)  player
andError: (init(player:))  NS_SWIFT_NAME 

§ listWithBlock:()

- (void) listWithBlock: (void(^)(NSArray< ShakaStoredContent * > *, ShakaPlayerError *_Nullable))  block

Lists all the stored content available. This gives an 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.

§ remove:withBlock:()

- (void) remove: (NSString *)  content_uri
withBlock: (ShakaPlayerAsyncBlock block 

Removes the given stored content. This will also attempt to release the licenses, if any.

Definition at line 129 of file ShakaPlayerStorage.mm.

§ removeEmeSessionsWithBlock:()

- (void) removeEmeSessionsWithBlock: (void(^)(BOOL, ShakaPlayerError *_Nullable))  block

Removes any EME sessions that were not successfully removed before. This gives whether all the sessions were successfully removed.

§ store:withAppMetadata:andBlock:()

- (void) store: (NSString *)  uri
withAppMetadata: (NSDictionary< NSString *, NSString * > *)  data
andBlock: (void(^)(ShakaStoredContent *, ShakaPlayerError *_Nullable))  block 

Stores the given manifest. This also stores the given data along side the media data so the app can store additional data.

§ store:withBlock:()

- (void) store: (NSString *)  uri
withBlock: (void(^)(ShakaStoredContent *, ShakaPlayerError *_Nullable))  block 

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.

Property Documentation

§ client

- (id< ShakaPlayerStorageClient >) client
readwriteatomicweak

A client that receives events during storage.

Definition at line 56 of file ShakaPlayerStorage.h.

§ storeInProgress

- (BOOL) storeInProgress
readatomicassign

Returns true if an asset is currently downloading.

Definition at line 59 of file ShakaPlayerStorage.h.


The documentation for this class was generated from the following files: