Skip to main content

Offline Manager Events

LuraOfflineEvent

Lura Offline Event object structure:

ValueDescription
type LuraOfflineEventTypeEvent type
data LuraOfflineEventDataData for current event

QUEUED

The QUEUED event is fired when download asset wait to start/resume downloading .

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.QUEUED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

PAUSED

The PAUSED event is fired when download asset was paused.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.PAUSED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

PAUSED_BY_REQUIREMENTS

The PAUSED_BY_REQUIREMENTS event is fired when download asset was paused by network requirements settings.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.QUEUED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

STOPPED

The STOPPED event is fired when download asset stop downloading.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.STOPPED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

STARTING

The STARTING event is fired when asset preparing to downloading.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.STARTING,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

DOWNLOADING

The DOWNLOADING event is fired when asset downloading start/resume.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.DOWNLOADING,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

PROGRESS

The PROGRESS event is fired when assets downloading.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.PROGRESS,
data = LuraOfflineEventData.Multiple(videos = listOf(LuraOfflineVideo()))
)

COMPLETED

The COMPLETED event is fired when asset downloaded.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.COMPLETED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

FAILED

The FAILED event is fired when asset downloading was failed.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.FAILED,
data = LuraOfflineEventData.Error(
error = LuraException(),
video = LuraOfflineVideo()
)
)

REMOVING

The REMOVING event is fired when downloading start removing/canceling.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.REMOVING,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

REMOVING_ALL

The REMOVING_ALL event is fired when all downloading start removing/canceling.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.REMOVING_ALL,
data = LuraOfflineEventData.Multiple(videos = listOf(LuraOfflineVideo()))
)

REMOVED

The REMOVED event is fired when downloading removed/canceled.
Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.REMOVED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

RESUMED_ALL

The RESUMED_ALL event is fired when all downloading resumed.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.RESUMED_ALL,
data = LuraOfflineEventData.Multiple(videos = listOf(LuraOfflineVideo()))
)

PAUSED_ALL

The PAUSED_ALL event is fired when all downloading paused.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.PAUSED_ALL,
data = LuraOfflineEventData.Multiple(videos = listOf(LuraOfflineVideo()))
)

RESTARTING

The RESTARTING event is fired when downloading restarting.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.RESTARTING,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

LICENSE_UPDATING

The LICENSE_UPDATING event is fired when DRM license start updating.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.LICENSE_UPDATING,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

LICENSE_UPDATED

The LICENSE_UPDATED event is fired when DRM license updated.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.LICENSE_UPDATED,
data = LuraOfflineEventData.Single(video = LuraOfflineVideo())
)

LICENSE_UPDATING_FAILED

The LICENSE_UPDATING_FAILED event is fired when updating DRM license was failed.

Example Event Payload
LuraOfflineEvent(
type = LuraOfflineEventType.LICENSE_UPDATING_FAILED,
data = LuraOfflineEventData.Error(
error = LuraException(),
video = LuraOfflineVideo()
)
)