Provides access to offline stream recording and playback functionality. This module can be accessed using the MediaPlayer API getOfflineController()

Parameters:
NameTypeDescription
configObject

dependencies

Methods

(static) loadRecordsFromStorage() → {Promise}

Loads records from storage
This methods has to be called first, to be sure that all downloads have been loaded

Returns:

asynchronously resolved

Type: 
Promise

createRecord(manifestURL) → {Promise}

Create a new content record in storage and download manifest from url

Parameters:
NameTypeDescription
manifestURLstring

the content manifest url

Returns:

asynchronously resolved with record identifier

Type: 
Promise

deleteRecord(id)

Deletes a record from storage

Parameters:
NameTypeDescription
idstring

record identifier

getAllRecords() → {Promise}

Get all records from storage

Returns:

asynchronously resolved with records

Type: 
Promise

getRecordProgression(id) → {number}

Get download progression of a record

Parameters:
NameTypeDescription
idstring

record identifier

Returns:

percentage progression

Type: 
number

resetRecords()

Reset all records

resumeRecord(id)

Resume downloading of the record

Parameters:
NameTypeDescription
idstring

record identifier

startRecord(id, mediaInfos)

Start downloading the record with selected tracks representations

Parameters:
NameTypeDescription
idstring

record identifier

mediaInfosArray.<MediaInfo>

the selected tracks representations

stopRecord(id)

Stop downloading of the record

Parameters:
NameTypeDescription
idstring

record identifier