docs/doc/reference/com/google/android/exoplayer2/ExoPlaybackException.html
Package com.google.android.exoplayer2
All Implemented Interfaces:Bundleable, Serializable
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classExoPlaybackExceptionextends[PlaybackException](PlaybackException.html "class 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 | ExoPlaybackException.Type |
Deprecated.
The type of source that produced the error. |
-
PlaybackException.ErrorCode
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<ExoPlaybackException> | CREATOR |
Deprecated.
Object that can restore ExoPlaybackException from a Bundle.
|
| MediaPeriodId | mediaPeriodId |
Deprecated.
The MediaPeriodId of the media associated with this error, or null if undetermined.
|
| Format | rendererFormat |
Deprecated.
If type is TYPE_RENDERER, this is the Format the renderer was using at the time of the exception, or null if the renderer wasn't using a Format.
|
| @com.google.android.exoplayer2.C.FormatSupport int | rendererFormatSupport |
Deprecated.
If type is TYPE_RENDERER, this is the level of C.FormatSupport of the renderer for rendererFormat.
|
| int | rendererIndex |
Deprecated.
If type is TYPE_RENDERER, this is the index of the renderer.
|
| String | rendererName |
Deprecated.
If type is TYPE_RENDERER, this is the name of the renderer.
|
| @com.google.android.exoplayer2.ExoPlaybackException.Type int | type |
Deprecated.
The ExoPlaybackException.Type of the playback failure.
|
| static int | TYPE_REMOTE |
Deprecated.
The error occurred in a remote component.
|
| static int | TYPE_RENDERER |
Deprecated.
The error occurred in a Renderer.
|
| static int | TYPE_SOURCE |
Deprecated.
The error occurred loading data from a MediaSource.
|
| static int | TYPE_UNEXPECTED |
Deprecated.
The error was an unexpected RuntimeException.
|
-
CUSTOM_ERROR_CODE_BASE, ERROR_CODE_AUDIO_TRACK_INIT_FAILED, ERROR_CODE_AUDIO_TRACK_WRITE_FAILED, ERROR_CODE_BEHIND_LIVE_WINDOW, ERROR_CODE_DECODER_INIT_FAILED, ERROR_CODE_DECODER_QUERY_FAILED, ERROR_CODE_DECODING_FAILED, ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES, ERROR_CODE_DECODING_FORMAT_UNSUPPORTED, ERROR_CODE_DRM_CONTENT_ERROR, ERROR_CODE_DRM_DEVICE_REVOKED, ERROR_CODE_DRM_DISALLOWED_OPERATION, ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED, ERROR_CODE_DRM_LICENSE_EXPIRED, ERROR_CODE_DRM_PROVISIONING_FAILED, ERROR_CODE_DRM_SCHEME_UNSUPPORTED, ERROR_CODE_DRM_SYSTEM_ERROR, ERROR_CODE_DRM_UNSPECIFIED, ERROR_CODE_FAILED_RUNTIME_CHECK, ERROR_CODE_IO_BAD_HTTP_STATUS, ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED, ERROR_CODE_IO_FILE_NOT_FOUND, ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE, ERROR_CODE_IO_NETWORK_CONNECTION_FAILED, ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT, ERROR_CODE_IO_NO_PERMISSION, ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE, ERROR_CODE_IO_UNSPECIFIED, ERROR_CODE_PARSING_CONTAINER_MALFORMED, ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED, ERROR_CODE_PARSING_MANIFEST_MALFORMED, ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED, ERROR_CODE_REMOTE_ERROR, ERROR_CODE_TIMEOUT, ERROR_CODE_UNSPECIFIED, ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED, ERROR_CODE_VIDEO_FRAME_PROCESSOR_INIT_FAILED, errorCode, FIELD_CUSTOM_ID_BASE, timestampMs
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static ExoPlaybackException | createForRemote(String message) |
Deprecated.
Creates an instance of type TYPE_REMOTE.
|
| static ExoPlaybackException | createForRenderer(Throwable cause, String rendererName, int rendererIndex, Format rendererFormat, @com.google.android.exoplayer2.C.FormatSupport int rendererFormatSupport, boolean isRecoverable, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) |
Deprecated.
Creates an instance of type TYPE_RENDERER.
|
| static ExoPlaybackException | createForSource(IOException cause, int errorCode) |
Deprecated.
Creates an instance of type TYPE_SOURCE.
|
| static ExoPlaybackException | createForUnexpected(RuntimeException cause) |
Deprecated.
Use createForUnexpected(RuntimeException, ERROR_CODE_UNSPECIFIED) instead.
|
| static ExoPlaybackException | createForUnexpected(RuntimeException cause, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode) |
Deprecated.
Creates an instance of type TYPE_UNEXPECTED.
|
| boolean | errorInfoEquals(PlaybackException that) |
Deprecated.
Returns whether the error data associated to this exception equals the error data associated to other.
|
| Exception | getRendererException() |
Deprecated.
Retrieves the underlying error when type is TYPE_RENDERER.
|
| IOException | getSourceException() |
Deprecated.
Retrieves the underlying error when type is TYPE_SOURCE.
|
| RuntimeException | getUnexpectedException() |
Deprecated.
Retrieves the underlying error when type is TYPE_UNEXPECTED.
|
| Bundle | toBundle() |
Deprecated.
Returns a Bundle representing the information stored in this object.
|
-
getErrorCodeName, getErrorCodeName
-
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 TYPE_SOURCE
Deprecated.
The error occurred loading data from a MediaSource.
Call getSourceException() to retrieve the underlying cause.
See Also:Constant Field Values
-
public static final int TYPE_RENDERER
Deprecated.
The error occurred in a Renderer.
Call getRendererException() to retrieve the underlying cause.
See Also:Constant Field Values
-
public static final int TYPE_UNEXPECTED
Deprecated.
The error was an unexpected RuntimeException.
Call getUnexpectedException() to retrieve the underlying cause.
See Also:Constant Field Values
-
public static final int TYPE_REMOTE
Deprecated.
The error occurred in a remote component.
Call Throwable.getMessage() to retrieve the message associated with the error.
See Also:Constant Field Values
-
[@Type](ExoPlaybackException.Type.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.ExoPlaybackException.Type int type
Deprecated.
The ExoPlaybackException.Type of the playback failure.
-
@Nullable
public final[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")rendererName
Deprecated.
If type is TYPE_RENDERER, this is the name of the renderer.
-
public final int rendererIndex
Deprecated.
If type is TYPE_RENDERER, this is the index of the renderer.
-
@Nullable
public final[Format](Format.html "class in com.google.android.exoplayer2")rendererFormat
Deprecated.
If type is TYPE_RENDERER, this is the Format the renderer was using at the time of the exception, or null if the renderer wasn't using a Format.
-
[@FormatSupport](C.FormatSupport.html "annotation in com.google.android.exoplayer2")public final @com.google.android.exoplayer2.C.FormatSupport int rendererFormatSupport
Deprecated.
If type is TYPE_RENDERER, this is the level of C.FormatSupport of the renderer for rendererFormat. If rendererFormat is null, this is C.FORMAT_HANDLED.
-
@Nullable
public final[MediaPeriodId](source/MediaPeriodId.html "class in com.google.android.exoplayer2.source")mediaPeriodId
Deprecated.
The MediaPeriodId of the media associated with this error, or null if undetermined.
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")> CREATOR
Deprecated.
Object that can restore ExoPlaybackException from a Bundle.
-
public static[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createForSource([IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")cause,
int errorCode)
Deprecated.
Creates an instance of type TYPE_SOURCE.
Parameters:cause - The cause of the failure.errorCode - See PlaybackException.errorCode.Returns:The created instance.
-
public static[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createForRenderer([Throwable](https://developer.android.com/reference/java/lang/Throwable.html "class or interface in java.lang")cause,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")rendererName,
int rendererIndex,
@Nullable[Format](Format.html "class in com.google.android.exoplayer2")rendererFormat,[@FormatSupport](C.FormatSupport.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.C.FormatSupport int rendererFormatSupport,
boolean isRecoverable,[@ErrorCode](PlaybackException.ErrorCode.html "annotation in com.google.android.exoplayer2")@com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.
Creates an instance of type TYPE_RENDERER.
Parameters:cause - The cause of the failure.rendererName - The name of the renderer in which the failure occurred.rendererIndex - The index of the renderer in which the failure occurred.rendererFormat - The Format the renderer was using at the time of the exception, or null if the renderer wasn't using a Format.rendererFormatSupport - The C.FormatSupport of the renderer for rendererFormat. Ignored if rendererFormat is null.isRecoverable - If the failure can be recovered by disabling and re-enabling the renderer.errorCode - See PlaybackException.errorCode.Returns:The created instance.
-
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public static[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createForUnexpected([RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html "class or interface in java.lang")cause)
Deprecated.
Use createForUnexpected(RuntimeException, ERROR_CODE_UNSPECIFIED) instead.
-
public static[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createForUnexpected([RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.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 of type TYPE_UNEXPECTED.
Parameters:cause - The cause of the failure.errorCode - See PlaybackException.errorCode.Returns:The created instance.
-
public static[ExoPlaybackException](ExoPlaybackException.html "class in com.google.android.exoplayer2")createForRemote([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")message)
Deprecated.
Creates an instance of type TYPE_REMOTE.
Parameters:message - The message associated with the error.Returns:The created instance.
-
public[IOException](https://developer.android.com/reference/java/io/IOException.html "class or interface in java.io")getSourceException()
Deprecated.
Retrieves the underlying error when type is TYPE_SOURCE.
Throws:IllegalStateException - If type is not TYPE_SOURCE.
-
public[Exception](https://developer.android.com/reference/java/lang/Exception.html "class or interface in java.lang")getRendererException()
Deprecated.
Retrieves the underlying error when type is TYPE_RENDERER.
Throws:IllegalStateException - If type is not TYPE_RENDERER.
-
public[RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html "class or interface in java.lang")getUnexpectedException()
Deprecated.
Retrieves the underlying error when type is TYPE_UNEXPECTED.
Throws:IllegalStateException - If type is not TYPE_UNEXPECTED.
-
public boolean errorInfoEquals(@Nullable[PlaybackException](PlaybackException.html "class in com.google.android.exoplayer2")that)
Deprecated.
Description copied from class: PlaybackException
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.
Overrides:errorInfoEquals in class PlaybackException
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Deprecated.
Returns a Bundle representing the information stored in this object.
It omits the mediaPeriodId field. The mediaPeriodId of an instance restored by CREATOR will always be null.
Specified by:toBundle in interface BundleableOverrides:toBundle in class PlaybackException