Package com.jwplayer.pub.api.offline
Enum Class OfflineDownloadState
- All Implemented Interfaces:
Serializable,Comparable<OfflineDownloadState>,Constable
State of an offline download, as reported by
OfflineDownloadInfo.getState().
Deliberately an SDK-owned type rather than the underlying player library's state constants, so that a host's download screen does not have to depend on that library's numbering.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFinished: every selected track was fully written to disk.Actively downloading.Stopped by an error.Started but not running, because a stop reason was set on it.Accepted and waiting to start, usually behind other downloads or a network requirement.Being deleted.Restarting after having been stopped or having failed. -
Method Summary
Modifier and TypeMethodDescriptionstatic OfflineDownloadStateReturns the enum constant of this class with the specified name.static OfflineDownloadState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
QUEUED
Accepted and waiting to start, usually behind other downloads or a network requirement. -
DOWNLOADING
Actively downloading. -
PAUSED
Started but not running, because a stop reason was set on it. Whatever it had already written is still on disk, so it does not have to start over if it is started again. -
COMPLETED
Finished: every selected track was fully written to disk. ItsOfflineDownloadInfo.getPlaylistItem()is the item to play it back offline - but see that method's note on what the reconstructed item does and does not carry (a host-suppliedMediaDrmCallbackmust be re-attached). -
FAILED
Stopped by an error.OfflineDownloadInfo.getFailureReason()is non-null for this state. Partial content may remain on disk. -
REMOVING
Being deleted. It will disappear fromOfflineDownloadManager.getDownloads(android.content.Context)shortly. -
RESTARTING
Restarting after having been stopped or having failed.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-