Skip to main content

Offline Manager Methods

maxParallelDownloads

The maximum number of parallel downloads

Returns: Int

//Get
val maxParallelDownloads = offlineManager?.maxParallelDownloads

//Set
offlineManager?.maxParallelDownloads = 3

setRequirements

Setting the requirements for downloads to progress

Params: LuraDownloadRequirement

offlineManager?.setRequirements(requirements: LuraDownloadRequirement)

getRequirements

Getting the requirements for downloads to progress

Returns: LuraDownloadRequirement

val requirements = offlineManager?.getRequirements()

download

Add an asset for download

Params: LuraConfiguration

offlineManager?.download(config: LuraConfiguration)

pause

Pause downloading the asset

Params: LuraConfiguration

offlineManager?.pause(config: LuraConfiguration)

pauseAll()

Pause all downloading

offlineManager?.pauseAll()

resume

Resume downloading the asset

Params: LuraConfiguration

offlineManager?.resume(config: LuraConfiguration)

resumeAll()

Resume all downloading

offlineManager?.resumeAll()

remove

Remove downloading

Params: LuraConfiguration

offlineManager?.remove(config: LuraConfiguration)

removeAll()

Remove all downloading

offlineManager?.removeAll()

getVideo

Get offline video object for lura configuration

Params: LuraConfiguration

Returns: LuraOfflineVideo

offlineManager?.getVideo(config: LuraConfiguration)

getVideos

Get all offline video objects

Returns: List\<LuraOfflineVideo>

offlineManager?.getVideos()

addListener

Add listener to handle downloading states

Params: LuraOfflineEventListener

offlineManager?.addListener(listener: LuraOfflineEventListener)

removeListener

Remove listener to handle downloading states

Params: LuraOfflineEventListener

offlineManager?.removeListener(listener: LuraOfflineEventListener)

updateLicense

Update DRM license for lura configuration

Params: LuraConfiguration

offlineManager?.updateLicense(config: LuraConfiguration)