Provides access to offline stream recording and playback functionality. This module can be accessed using the MediaPlayer API getOfflineController()
Name | Type | Description |
---|---|---|
config | Object | 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
asynchronously resolved
- Type:
- Promise
createRecord(manifestURL) → {Promise}
Create a new content record in storage and download manifest from url
Name | Type | Description |
---|---|---|
manifestURL | string | the content manifest url |
asynchronously resolved with record identifier
- Type:
- Promise
deleteRecord(id)
Deletes a record from storage
Name | Type | Description |
---|---|---|
id | string | record identifier |
getAllRecords() → {Promise}
Get all records from storage
asynchronously resolved with records
- Type:
- Promise
getRecordProgression(id) → {number}
Get download progression of a record
Name | Type | Description |
---|---|---|
id | string | record identifier |
percentage progression
- Type:
- number
resetRecords()
Reset all records
resumeRecord(id)
Resume downloading of the record
Name | Type | Description |
---|---|---|
id | string | record identifier |
startRecord(id, mediaInfos)
Start downloading the record with selected tracks representations
Name | Type | Description |
---|---|---|
id | string | record identifier |
mediaInfos | Array.<MediaInfo> | the selected tracks representations |
stopRecord(id)
Stop downloading of the record
Name | Type | Description |
---|---|---|
id | string | record identifier |