Use this class to manage an offline-downloadable asset. More...

#import <OODtoAsset.h>

+ Inheritance diagram for OODtoAsset:

Instance Methods

(nonnull instancetype) - NS_UNAVAILABLE
 
(nonnull instancetype) - initWithOptions:andName:
 Initializes a new OODtoAsset instance with the supplied OOAssetDownloadOptions. More...
 
(void) - downloadWithProgressClosure:
 Starts a download of an asset with the progress closure. More...
 
(void) - progressWithProgressClosure:
 Sets a progress closure for the existing asset. More...
 
(void) - finishWithRelativePath:
 Sets a finish closure. More...
 
(void) - onErrorWithErrorClosure:
 Sets an error closure. More...
 
(void) - cancelDownload
 Cancels a download of the asset. More...
 
(void) - deleteAsset
 Deletes the asset. More...
 
(void) - pauseDownload
 Pauses the download of the asset. More...
 
(void) - resumeDownload
 Resumes the download of the asset. More...
 
(void) - getStreamsWithCallback:
 Returns an array with the available streams and their information if it is available for the embed code. More...
 

Properties

NSString * embedCode
 Embed code managed by this OODtoAsset instance. More...
 
NSString * name
 Human readable asset name displayed in UI. More...
 
OOAssetDownloadOptionsoptions
 OOAssetDownloadOptions set for a specific asset. More...
 
AVURLAsset * urlAsset
 
AVMediaSelection * mediaSelection
 AVMediaSelection set for a specific asset (e.g. More...
 
NSString * currentDownload
 
NSURL * localUrl
 NSURL pointing to a local resource with the downloaded asset. More...
 
NSURL * fairplayKey
 NSURL pointing to a local resource with the Fairplay key. More...
 
OODtoAssetState state
 State of the asset. More...
 
NSString * stateText
 String text of the asset's state. More...
 
OOOfflineVideoofflineVideo
 An instance of OOOfflineVideo for the specific asset if downloaded. More...
 
ProgressParameter _Nullable progressClosure
 
FinishParameter _Nullable finishClosure
 
ErrorParameter _Nullable errorClosure
 
BOOL success
 Flag indicating if download was successful. More...
 
OOOoyalaError *_Nullable error
 Error if exists. More...
 

Detailed Description

Use this class to manage an offline-downloadable asset.

Since
iOS 10

Method Documentation

- (void) cancelDownload

Cancels a download of the asset.

- (void) deleteAsset

Deletes the asset.

- (void) downloadWithProgressClosure: (nullable ProgressParameter)  closure

Starts a download of an asset with the progress closure.

Parameters
closureA progress-handling closure
- (void) finishWithRelativePath: (nonnull FinishParameter)  closure

Sets a finish closure.

Parameters
closureA relative-path handling closure
- (void) getStreamsWithCallback: (void(^)(NSArray< OOAssetDownloadStream * > *_Nullable streams))  callback

Returns an array with the available streams and their information if it is available for the embed code.

Parameters
callbacka nullable array of streams
- (nonnull instancetype) initWithOptions: (nonnull OOAssetDownloadOptions *)  options
andName: (nonnull NSString *)  NS_DESIGNATED_INITIALIZER 

Initializes a new OODtoAsset instance with the supplied OOAssetDownloadOptions.

Parameters
optionsMust not be null and all values are required.
nameHuman readable name for the asset
Returns
new OODtoAsset instance
- (nonnull instancetype) NS_UNAVAILABLE
- (void) onErrorWithErrorClosure: (nonnull ErrorParameter)  closure

Sets an error closure.

Parameters
closureAn error-handling closure
- (void) pauseDownload

Pauses the download of the asset.

- (void) progressWithProgressClosure: (nonnull ProgressParameter)  closure

Sets a progress closure for the existing asset.

Parameters
closureA progress-handling closure
- (void) resumeDownload

Resumes the download of the asset.

Property Documentation

- (NSString*) currentDownload
readwritenonatomicassign
- (NSString*) embedCode
readnonatomicassign

Embed code managed by this OODtoAsset instance.

It's first initialized when supplying the OOAssetDownloadOptions.

- (OOOoyalaError* _Nullable) error
readwriteatomic

Error if exists.

- (ErrorParameter _Nullable) errorClosure
readwriteatomic
- (NSURL*) fairplayKey
readnonatomicassign

NSURL pointing to a local resource with the Fairplay key.

- (FinishParameter _Nullable) finishClosure
readwriteatomic
- (NSURL*) localUrl
readnonatomicassign

NSURL pointing to a local resource with the downloaded asset.

- (AVMediaSelection*) mediaSelection
readwritenonatomicassign

AVMediaSelection set for a specific asset (e.g.

closed captions).

- (NSString*) name
readnonatomicassign

Human readable asset name displayed in UI.

- (OOOfflineVideo*) offlineVideo
readnonatomicassign

An instance of OOOfflineVideo for the specific asset if downloaded.

- (OOAssetDownloadOptions*) options
readnonatomicassign

OOAssetDownloadOptions set for a specific asset.

- (ProgressParameter _Nullable) progressClosure
readwriteatomic
- (OODtoAssetState) state
readnonatomicassign

State of the asset.

- (NSString*) stateText
readnonatomicassign

String text of the asset's state.

- (BOOL) success
readwriteatomic

Flag indicating if download was successful.

- (AVURLAsset*) urlAsset
readwritenonatomicassign

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