docs/doc/reference/com/google/android/exoplayer2/PlaybackException.html
Package com.google.android.exoplayer2
All Implemented Interfaces:Bundleable, SerializableDirect Known Subclasses:ExoPlaybackException
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classPlaybackExceptionextends[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Thrown when a non locally recoverable playback failure occurs. See Also:Serialized Form
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | PlaybackException.ErrorCode |
Deprecated.
Codes that identify causes of player errors. |
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<PlaybackException> | CREATOR |
Deprecated.
Object that can create a PlaybackException from a Bundle.
|
| static int | CUSTOM_ERROR_CODE_BASE |
Deprecated.
Player implementations that want to surface custom errors can use error codes greater than this value, so as to avoid collision with other error codes defined in this class.
|
| static int | ERROR_CODE_AUDIO_TRACK_INIT_FAILED |
Deprecated.
Caused by an AudioTrack initialization failure.
|
| static int | ERROR_CODE_AUDIO_TRACK_WRITE_FAILED |
Deprecated.
Caused by an AudioTrack write operation failure.
|
| static int | ERROR_CODE_BEHIND_LIVE_WINDOW |
Deprecated.
Caused by the loading position falling behind the sliding window of available live content.
|
| static int | ERROR_CODE_DECODER_INIT_FAILED |
Deprecated.
Caused by a decoder initialization failure.
|
| static int | ERROR_CODE_DECODER_QUERY_FAILED |
Deprecated.
Caused by a decoder query failure.
|
| static int | ERROR_CODE_DECODING_FAILED |
Deprecated.
Caused by a failure while trying to decode media samples.
|
| static int | ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES |
Deprecated.
Caused by trying to decode content whose format exceeds the capabilities of the device.
|
| static int | ERROR_CODE_DECODING_FORMAT_UNSUPPORTED |
Deprecated.
Caused by trying to decode content whose format is not supported.
|
| static int | ERROR_CODE_DRM_CONTENT_ERROR |
Deprecated.
Caused by attempting to play incompatible DRM-protected content.
|
| static int | ERROR_CODE_DRM_DEVICE_REVOKED |
Deprecated.
Caused by the device having revoked DRM privileges.
|
| static int | ERROR_CODE_DRM_DISALLOWED_OPERATION |
Deprecated.
Caused by an operation being disallowed by a license policy.
|
| static int | ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED |
Deprecated.
Caused by a failure while trying to obtain a license.
|
| static int | ERROR_CODE_DRM_LICENSE_EXPIRED |
Deprecated.
Caused by an expired DRM license being loaded into an open DRM session.
|
| static int | ERROR_CODE_DRM_PROVISIONING_FAILED |
Deprecated.
Caused by a failure while provisioning the device.
|
| static int | ERROR_CODE_DRM_SCHEME_UNSUPPORTED |
Deprecated.
Caused by a chosen DRM protection scheme not being supported by the device.
|
| static int | ERROR_CODE_DRM_SYSTEM_ERROR |
Deprecated.
Caused by an error in the DRM system.
|
| static int | ERROR_CODE_DRM_UNSPECIFIED |
Deprecated.
Caused by an unspecified error related to DRM protection.
|
| static int | ERROR_CODE_FAILED_RUNTIME_CHECK |
Deprecated.
Caused by a failed runtime check.
|
| static int | ERROR_CODE_IO_BAD_HTTP_STATUS |
Deprecated.
Caused by an HTTP server returning an unexpected HTTP response status code.
|
| static int | ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED |
Deprecated.
Caused by the player trying to access cleartext HTTP traffic (meaning http:// rather than https://) when the app's Network Security Configuration does not permit it.
|
| static int | ERROR_CODE_IO_FILE_NOT_FOUND |
Deprecated.
Caused by a non-existent file.
|
| static int | ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE |
Deprecated.
Caused by a server returning a resource with an invalid "Content-Type" HTTP header value.
|
| static int | ERROR_CODE_IO_NETWORK_CONNECTION_FAILED |
Deprecated.
Caused by a network connection failure.
|
| static int | ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT |
Deprecated.
Caused by a network timeout, meaning the server is taking too long to fulfill a request.
|
| static int | ERROR_CODE_IO_NO_PERMISSION |
Deprecated.
Caused by lack of permission to perform an IO operation.
|
| static int | ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE |
Deprecated.
Caused by reading data out of the data bound.
|
| static int | ERROR_CODE_IO_UNSPECIFIED |
Deprecated.
Caused by an Input/Output error which could not be identified.
|
| static int | ERROR_CODE_PARSING_CONTAINER_MALFORMED |
Deprecated.
Caused by a parsing error associated with a media container format bitstream.
|
| static int | ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED |
Deprecated.
Caused by attempting to extract a file with an unsupported media container format, or an unsupported media container feature.
|
| static int | ERROR_CODE_PARSING_MANIFEST_MALFORMED |
Deprecated.
Caused by a parsing error associated with a media manifest.
|
| static int | ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED |
Deprecated.
Caused by an unsupported feature in a media manifest.
|
| static int | ERROR_CODE_REMOTE_ERROR |
Deprecated.
Caused by an unidentified error in a remote Player, which is a Player that runs on a different host or process.
|
| static int | ERROR_CODE_TIMEOUT |
Deprecated.
Caused by a generic timeout.
|
| static int | ERROR_CODE_UNSPECIFIED |
Deprecated.
Caused by an error whose cause could not be identified.
|
| static int | ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED |
Deprecated.
Caused by a failure when processing a video frame.
|
| static int | ERROR_CODE_VIDEO_FRAME_PROCESSOR_INIT_FAILED |
Deprecated.
Caused by a failure when initializing a VideoFrameProcessor.
|
| @com.google.android.exoplayer2.PlaybackException.ErrorCode int | errorCode |
Deprecated.
An error code which identifies the cause of the playback failure.
|
| protected static int | FIELD_CUSTOM_ID_BASE |
Deprecated.
Defines a minimum field ID value for subclasses to use when implementing toBundle() and Bundleable.Creator.
|
| long | timestampMs |
Deprecated.
The value of SystemClock.elapsedRealtime() when this exception was created.
|
Constructors | Modifier | Constructor | Description |
| --- | --- | --- |
| protected | PlaybackException(Bundle bundle) |
Deprecated.
Creates a new instance using the fields obtained from the given Bundle.
|
| | PlaybackException(String message, Throwable cause, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) |
Deprecated.
Creates an instance.
|
| protected | PlaybackException(String message, Throwable cause, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode, long timestampMs) |
Deprecated.
Creates a new instance using the given values. |
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | errorInfoEquals(PlaybackException other) |
Deprecated.
Returns whether the error data associated to this exception equals the error data associated to other.
|
| String | getErrorCodeName() |
Deprecated.
Equivalent to PlaybackException.getErrorCodeName(this.errorCode).
|
| static String | getErrorCodeName(@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) |
Deprecated.
Returns the name of a given errorCode.
|
| Bundle | toBundle() |
Deprecated.
Returns a Bundle representing the information stored in this object.
|
-
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
public static final int ERROR_CODE_UNSPECIFIED
Deprecated.
Caused by an error whose cause could not be identified. See Also:Constant Field Values
-
public static final int ERROR_CODE_REMOTE_ERROR
Deprecated.
Caused by an unidentified error in a remote Player, which is a Player that runs on a different host or process. See Also:Constant Field Values
-
public static final int ERROR_CODE_BEHIND_LIVE_WINDOW
Deprecated.
Caused by the loading position falling behind the sliding window of available live content. See Also:Constant Field Values
-
public static final int ERROR_CODE_TIMEOUT
Deprecated.
Caused by a generic timeout. See Also:Constant Field Values
-
public static final int ERROR_CODE_FAILED_RUNTIME_CHECK
Deprecated.
Caused by a failed runtime check.
This can happen when the application fails to comply with the player's API requirements (for example, by passing invalid arguments), or when the player reaches an invalid state.
See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_UNSPECIFIED
Deprecated.
Caused by an Input/Output error which could not be identified. See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_NETWORK_CONNECTION_FAILED
Deprecated.
Caused by a network connection failure.
The following is a non-exhaustive list of possible reasons:
- There is no network connectivity (you can check this by querying [`ConnectivityManager.getActiveNetwork()`](https://developer.android.com/reference/android/net/ConnectivityManager.html#getActiveNetwork() "class or interface in android.net")).
- The URL's domain is misspelled or does not exist.
- The target host is unreachable.
- The server unexpectedly closes the connection.
See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT
Deprecated.
Caused by a network timeout, meaning the server is taking too long to fulfill a request. See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE
Deprecated.
Caused by a server returning a resource with an invalid "Content-Type" HTTP header value.
For example, this can happen when the player is expecting a piece of media, but the server returns a paywall HTML page, with content type "text/html".
See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_BAD_HTTP_STATUS
Deprecated.
Caused by an HTTP server returning an unexpected HTTP response status code. See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_FILE_NOT_FOUND
Deprecated.
Caused by a non-existent file. See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_NO_PERMISSION
Deprecated.
Caused by lack of permission to perform an IO operation. For example, lack of permission to access internet or external storage. See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED
Deprecated.
Caused by the player trying to access cleartext HTTP traffic (meaning http:// rather than https://) when the app's Network Security Configuration does not permit it.
See this corresponding troubleshooting topic.
See Also:Constant Field Values
-
public static final int ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE
Deprecated.
Caused by reading data out of the data bound. See Also:Constant Field Values
-
public static final int ERROR_CODE_PARSING_CONTAINER_MALFORMED
Deprecated.
Caused by a parsing error associated with a media container format bitstream. See Also:Constant Field Values
-
public static final int ERROR_CODE_PARSING_MANIFEST_MALFORMED
Deprecated.
Caused by a parsing error associated with a media manifest. Examples of a media manifest are a DASH or a SmoothStreaming manifest, or an HLS playlist. See Also:Constant Field Values
-
public static final int ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED
Deprecated.
Caused by attempting to extract a file with an unsupported media container format, or an unsupported media container feature. See Also:Constant Field Values
-
public static final int ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED
Deprecated.
Caused by an unsupported feature in a media manifest. Examples of a media manifest are a DASH or a SmoothStreaming manifest, or an HLS playlist. See Also:Constant Field Values
-
public static final int ERROR_CODE_DECODER_INIT_FAILED
Deprecated.
Caused by a decoder initialization failure. See Also:Constant Field Values
-
public static final int ERROR_CODE_DECODER_QUERY_FAILED
Deprecated.
Caused by a decoder query failure. See Also:Constant Field Values
-
public static final int ERROR_CODE_DECODING_FAILED
Deprecated.
Caused by a failure while trying to decode media samples. See Also:Constant Field Values
-
public static final int ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES
Deprecated.
Caused by trying to decode content whose format exceeds the capabilities of the device. See Also:Constant Field Values
-
public static final int ERROR_CODE_DECODING_FORMAT_UNSUPPORTED
Deprecated.
Caused by trying to decode content whose format is not supported. See Also:Constant Field Values
-
public static final int ERROR_CODE_AUDIO_TRACK_INIT_FAILED
Deprecated.
Caused by an AudioTrack initialization failure. See Also:Constant Field Values
-
public static final int ERROR_CODE_AUDIO_TRACK_WRITE_FAILED
Deprecated.
Caused by an AudioTrack write operation failure. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_UNSPECIFIED
Deprecated.
Caused by an unspecified error related to DRM protection. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_SCHEME_UNSUPPORTED
Deprecated.
Caused by a chosen DRM protection scheme not being supported by the device. Examples of DRM protection schemes are ClearKey and Widevine. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_PROVISIONING_FAILED
Deprecated.
Caused by a failure while provisioning the device. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_CONTENT_ERROR
Deprecated.
Caused by attempting to play incompatible DRM-protected content.
For example, this can happen when attempting to play a DRM protected stream using a scheme (like Widevine) for which there is no corresponding license acquisition data (like a pssh box).
See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED
Deprecated.
Caused by a failure while trying to obtain a license. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_DISALLOWED_OPERATION
Deprecated.
Caused by an operation being disallowed by a license policy. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_SYSTEM_ERROR
Deprecated.
Caused by an error in the DRM system. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_DEVICE_REVOKED
Deprecated.
Caused by the device having revoked DRM privileges. See Also:Constant Field Values
-
public static final int ERROR_CODE_DRM_LICENSE_EXPIRED
Deprecated.
Caused by an expired DRM license being loaded into an open DRM session. See Also:Constant Field Values
-
public static final int ERROR_CODE_VIDEO_FRAME_PROCESSOR_INIT_FAILED
Deprecated.
Caused by a failure when initializing a VideoFrameProcessor.
See Also:Constant Field Values
-
public static final int ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED
Deprecated.
Caused by a failure when processing a video frame. See Also:Constant Field Values
-
public static final int CUSTOM_ERROR_CODE_BASE
Deprecated.
Player implementations that want to surface custom errors can use error codes greater than this value, so as to avoid collision with other error codes defined in this class. See Also:Constant Field Values
-
[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode
Deprecated.
An error code which identifies the cause of the playback failure.
-
public final long timestampMs
Deprecated.
The value of SystemClock.elapsedRealtime() when this exception was created.
-
protected static final int FIELD_CUSTOM_ID_BASE
Deprecated.
Defines a minimum field ID value for subclasses to use when implementing toBundle() and Bundleable.Creator.
Subclasses should obtain their Bundle's field keys by applying a non-negative offset on this constant and passing the result to Util.intToStringMaxRadix(int).
See Also:Constant Field Values
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[PlaybackException](PlaybackException.html "class in com.google.android.exoplayer2")> CREATOR
Deprecated.
Object that can create a PlaybackException from a Bundle.
-
public PlaybackException(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.
Creates an instance.
Parameters:errorCode - A number which identifies the cause of the error. May be one of the ErrorCodes.cause - See Throwable.getCause().message - See Throwable.getMessage().
-
protected PlaybackException([Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")bundle)
Deprecated.
Creates a new instance using the fields obtained from the given Bundle.
-
protected PlaybackException(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message,
@Nullable[Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode,
long timestampMs)
Deprecated.
Creates a new instance using the given values.
-
public static[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getErrorCodeName([@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.
Returns the name of a given errorCode.
-
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getErrorCodeName()
Deprecated.
Equivalent to PlaybackException.getErrorCodeName(this.errorCode).
-
@CallSuper
public boolean errorInfoEquals(@Nullable[PlaybackException](PlaybackException.html "class in com.google.android.exoplayer2")other)
Deprecated.
Returns whether the error data associated to this exception equals the error data associated to other.
Note that this method does not compare the exceptions' stacktraces.
-
@CallSuper
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Deprecated.
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable