Provides access to offline stream recording and playback functionality. This module can be accessed using the MediaPlayer API getOfflineController()
Methods
-
<static> loadRecordsFromStorage()
-
Loads records from storage
This methods has to be called first, to be sure that all downloads have been loadedReturns:
asynchronously resolved
- Type
- Promise
-
createRecord(manifestURL)
-
Create a new content record in storage and download manifest from url
Parameters:
Name Type Description manifestURL
string the content manifest url
Returns:
asynchronously resolved with record identifier
- Type
- Promise
-
deleteRecord(id)
-
Deletes a record from storage
Parameters:
Name Type Description id
string record identifier
-
getAllRecords()
-
Get all records from storage
Returns:
asynchronously resolved with records
- Type
- Promise
-
getRecordProgression(id)
-
Get download progression of a record
Parameters:
Name Type Description id
string record identifier
Returns:
percentage progression
- Type
- number
-
resetRecords()
-
Reset all records
-
resumeRecord(id)
-
Resume downloading of the record
Parameters:
Name Type Description id
string record identifier
-
startRecord(id, mediaInfos)
-
Start downloading the record with selected tracks representations
Parameters:
Name Type Description id
string record identifier
mediaInfos
Array.<MediaInfo> the selected tracks representations
-
stopRecord(id)
-
Stop downloading of the record
Parameters:
Name Type Description id
string record identifier