OpenTV Player SDK For iOS  version 2.30.0
NMPDownload Class Reference

This class aggregates all the information pertaining to the download of a media asset. More...

#import <Download.h>

Inheritance diagram for NMPDownload:

Instance Methods

(NMPDownload *) - initWithDownload:
 

Properties

NSString * UUID
 Returns the Universal Unique ID attributed to this download. More...
 
NMPDownloadState state
 Returns the state of the download. More...
 
NMPDownloadError error
 Returns the failure reason of the download. More...
 
NSString * URI
 Returns the URI of the content. More...
 
NSString * localURI
 Returns the local URI of the content. More...
 
unsigned int startTime
 Returns the start time of the download, in seconds since 1970. More...
 
unsigned int timeElapsed
 Returns the time elapsed downloading, in milliseconds. More...
 
unsigned int timeRemaining
 Returns an estimate of the time remaining to complete the download, in milliseconds. More...
 
unsigned int bitrateEstimate
 Get an estimate of the download bitrate, This value will fluctuate depending on the network conditions. More...
 
NMPAssetasset
 Returns the Asset object of the download. More...
 

Detailed Description

This class aggregates all the information pertaining to the download of a media asset.

The information contained in it is a snapshot of the current download. Hence following the evolution of any of the data associated with this class will require to refetch the data. The client application can typically store this object for later comparison with new objects exported on notifications.

This class offers access to information pertaining to a download only, such as the remote URI of what is being download, some timing information, the download bitrate or the error status if any.

Adaptive streaming or media related information are only available once the download entered the STATE_PREPARED state, and are accessible in the NMPAsset and NMPMediaInfo classes.

See also
NMPDownloadManager
NMPAsset
NMPMediaInfo

Definition at line 115 of file Download.h.

Method Documentation

◆ initWithDownload:()

- (NMPDownload*) initWithDownload: (NMPDownload *)  other

Property Documentation

◆ asset

- (NMPAsset*) asset
readatomicassign

Returns the Asset object of the download.

Returns null as long as the download is in the STATE_PREPARING state. The download manager must take some time to access and parse the adaptive streaming manifest file before offering that information to the client application.

Definition at line 176 of file Download.h.

◆ bitrateEstimate

- (unsigned int) bitrateEstimate
readatomicassign

Get an estimate of the download bitrate, This value will fluctuate depending on the network conditions.

Definition at line 168 of file Download.h.

◆ error

- (NMPDownloadError) error
readatomicassign

Returns the failure reason of the download.

This field applies only if the state is STATE_FAILED, returns null otherwise.

Definition at line 133 of file Download.h.

◆ localURI

- (NSString*) localURI
readatomicassign

Returns the local URI of the content.

This URI will point to the master manifest on the device storage.

Definition at line 145 of file Download.h.

◆ startTime

- (unsigned int) startTime
readatomicassign

Returns the start time of the download, in seconds since 1970.

Returns zero as long as the download has not been started.

Definition at line 151 of file Download.h.

◆ state

- (NMPDownloadState) state
readatomicassign

Returns the state of the download.

The client application can rely on this state to know where the download is at.

Definition at line 127 of file Download.h.

◆ timeElapsed

- (unsigned int) timeElapsed
readatomicassign

Returns the time elapsed downloading, in milliseconds.

Definition at line 156 of file Download.h.

◆ timeRemaining

- (unsigned int) timeRemaining
readatomicassign

Returns an estimate of the time remaining to complete the download, in milliseconds.

This value can fluctuate depending on the network conditions.

Definition at line 162 of file Download.h.

◆ URI

- (NSString*) URI
readatomicassign

Returns the URI of the content.

This URI ought to point to the master manifest on the CDN.

Definition at line 139 of file Download.h.

◆ UUID

- (NSString*) UUID
readatomiccopy

Returns the Universal Unique ID attributed to this download.

This value acts as a key for all requests and operation linked to the download.

Definition at line 121 of file Download.h.