OfflineContentManager

Provides the means to download and store sources locally that can be played back with a Player without an active network connection. An OfflineContentManager instance can be created via the OfflineContentManager.getOfflineContentManager function.

The OfflineContentManager emits OfflineEvents during its lifecycle. See EventEmitter on how to subscribe to events.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Creates an OfflineSourceConfig, which can be used to play the offline content with a Player or returns null, if no offline content is available.

Link copied to clipboard

A DrmLicenseInformation object containing the remaining drm license duration and the remaining playback duration. Throws an IOException if the loading of the DRM key fails. Throws an UnsupportedDrmException if the provided DRM technology is not supported. Throws a DrmSessionException if the DRM licensing call to the server fails

Link copied to clipboard
abstract val usedStorage: Long

Returns how many bytes of storage are used by the offline content.

Functions

Link copied to clipboard
abstract fun deleteAll()

Deletes everything related to the related content ID.

Link copied to clipboard
abstract fun downloadLicense()

Downloads the offline license. When finished successfully OfflineContentManagerListener.onDrmLicenseUpdated will be called. Errors are transmitted by a OfflineContentManagerListener.onError call and an OfflineEvent.Error event.

Link copied to clipboard
abstract fun getOptions()
Link copied to clipboard
abstract fun process(offlineContentOptions: OfflineContentOptions)

Enqueues downloads and deletions according to the current OfflineOptionEntryState and OfflineOptionEntryAction of the OfflineOptionEntry in the OfflineContentOptions.

Link copied to clipboard
abstract fun release()

Releases the memory resources. IMPORTANT: Call this when the Activity/Context, in which it was created, is destroy. The OfflineContentManager should not be used after calling this method.

Link copied to clipboard
abstract fun releaseLicense()

Releases the currently held offline license. When finished successfully OfflineContentManagerListener.onDrmLicenseUpdated will be called. Errors are transmitted by a OfflineContentManagerListener.onError call and an OfflineEvent.Error event.

Link copied to clipboard
abstract fun renewOfflineLicense()

Renews the already downloaded DRM license. When successfully finished OfflineContentManagerListener.onDrmLicenseUpdated will be called. Errors are transmitted by a OfflineContentManagerListener.onError call and an OfflineEvent.Error event.

Link copied to clipboard
abstract fun resume()

Resumes all suspended actions.

Link copied to clipboard
abstract fun suspend()

Suspends all active actions.