Package com.google.android.exoplayer2
Class ExoPlaybackException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.google.android.exoplayer2.PlaybackException
-
- com.google.android.exoplayer2.ExoPlaybackException
-
- All Implemented Interfaces:
Bundleable
,Serializable
@Deprecated public final class ExoPlaybackException extends PlaybackException
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 Class Summary
Nested Classes Modifier and Type Class Description static interface
ExoPlaybackException.Type
Deprecated.The type of source that produced the error.-
Nested classes/interfaces inherited from class com.google.android.exoplayer2.PlaybackException
PlaybackException.ErrorCode
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<ExoPlaybackException>
CREATOR
Deprecated.Object that can restoreExoPlaybackException
from aBundle
.MediaPeriodId
mediaPeriodId
Deprecated.TheMediaPeriodId
of the media associated with this error, or null if undetermined.Format
rendererFormat
Deprecated.Iftype
isTYPE_RENDERER
, this is theFormat
the renderer was using at the time of the exception, or null if the renderer wasn't using aFormat
.@com.google.android.exoplayer2.C.FormatSupport int
rendererFormatSupport
Deprecated.int
rendererIndex
Deprecated.Iftype
isTYPE_RENDERER
, this is the index of the renderer.String
rendererName
Deprecated.Iftype
isTYPE_RENDERER
, this is the name of the renderer.@com.google.android.exoplayer2.ExoPlaybackException.Type int
type
Deprecated.TheExoPlaybackException.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 aRenderer
.static int
TYPE_SOURCE
Deprecated.The error occurred loading data from aMediaSource
.static int
TYPE_UNEXPECTED
Deprecated.The error was an unexpectedRuntimeException
.-
Fields inherited from class com.google.android.exoplayer2.PlaybackException
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
-
-
Method Summary
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 typeTYPE_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 typeTYPE_RENDERER
.static ExoPlaybackException
createForSource(IOException cause, int errorCode)
Deprecated.Creates an instance of typeTYPE_SOURCE
.static ExoPlaybackException
createForUnexpected(RuntimeException cause)
Deprecated.static ExoPlaybackException
createForUnexpected(RuntimeException cause, @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.Creates an instance of typeTYPE_UNEXPECTED
.boolean
errorInfoEquals(PlaybackException that)
Deprecated.Returns whether the error data associated to this exception equals the error data associated toother
.Exception
getRendererException()
Deprecated.Retrieves the underlying error whentype
isTYPE_RENDERER
.IOException
getSourceException()
Deprecated.Retrieves the underlying error whentype
isTYPE_SOURCE
.RuntimeException
getUnexpectedException()
Deprecated.Retrieves the underlying error whentype
isTYPE_UNEXPECTED
.Bundle
toBundle()
Deprecated.Returns aBundle
representing the information stored in this object.-
Methods inherited from class com.google.android.exoplayer2.PlaybackException
getErrorCodeName, getErrorCodeName
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
TYPE_SOURCE
public static final int TYPE_SOURCE
Deprecated.The error occurred loading data from aMediaSource
.Call
getSourceException()
to retrieve the underlying cause.- See Also:
- Constant Field Values
-
TYPE_RENDERER
public static final int TYPE_RENDERER
Deprecated.The error occurred in aRenderer
.Call
getRendererException()
to retrieve the underlying cause.- See Also:
- Constant Field Values
-
TYPE_UNEXPECTED
public static final int TYPE_UNEXPECTED
Deprecated.The error was an unexpectedRuntimeException
.Call
getUnexpectedException()
to retrieve the underlying cause.- See Also:
- Constant Field Values
-
TYPE_REMOTE
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
@Type public final @com.google.android.exoplayer2.ExoPlaybackException.Type int type
Deprecated.TheExoPlaybackException.Type
of the playback failure.
-
rendererName
@Nullable public final String rendererName
Deprecated.Iftype
isTYPE_RENDERER
, this is the name of the renderer.
-
rendererIndex
public final int rendererIndex
Deprecated.Iftype
isTYPE_RENDERER
, this is the index of the renderer.
-
rendererFormat
@Nullable public final Format rendererFormat
Deprecated.Iftype
isTYPE_RENDERER
, this is theFormat
the renderer was using at the time of the exception, or null if the renderer wasn't using aFormat
.
-
rendererFormatSupport
@FormatSupport public final @com.google.android.exoplayer2.C.FormatSupport int rendererFormatSupport
Deprecated.Iftype
isTYPE_RENDERER
, this is the level ofC.FormatSupport
of the renderer forrendererFormat
. IfrendererFormat
is null, this isC.FORMAT_HANDLED
.
-
mediaPeriodId
@Nullable public final MediaPeriodId mediaPeriodId
Deprecated.TheMediaPeriodId
of the media associated with this error, or null if undetermined.
-
CREATOR
public static final Bundleable.Creator<ExoPlaybackException> CREATOR
Deprecated.Object that can restoreExoPlaybackException
from aBundle
.
-
-
Method Detail
-
createForSource
public static ExoPlaybackException createForSource(IOException cause, int errorCode)
Deprecated.Creates an instance of typeTYPE_SOURCE
.- Parameters:
cause
- The cause of the failure.errorCode
- SeePlaybackException.errorCode
.- Returns:
- The created instance.
-
createForRenderer
public static ExoPlaybackException createForRenderer(Throwable cause, String rendererName, int rendererIndex, @Nullable Format rendererFormat, @FormatSupport @com.google.android.exoplayer2.C.FormatSupport int rendererFormatSupport, boolean isRecoverable, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.Creates an instance of typeTYPE_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
- TheFormat
the renderer was using at the time of the exception, or null if the renderer wasn't using aFormat
.rendererFormatSupport
- TheC.FormatSupport
of the renderer forrendererFormat
. Ignored ifrendererFormat
is null.isRecoverable
- If the failure can be recovered by disabling and re-enabling the renderer.errorCode
- SeePlaybackException.errorCode
.- Returns:
- The created instance.
-
createForUnexpected
@Deprecated public static ExoPlaybackException createForUnexpected(RuntimeException cause)
Deprecated.
-
createForUnexpected
public static ExoPlaybackException createForUnexpected(RuntimeException cause, @ErrorCode @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
Deprecated.Creates an instance of typeTYPE_UNEXPECTED
.- Parameters:
cause
- The cause of the failure.errorCode
- SeePlaybackException.errorCode
.- Returns:
- The created instance.
-
createForRemote
public static ExoPlaybackException createForRemote(String message)
Deprecated.Creates an instance of typeTYPE_REMOTE
.- Parameters:
message
- The message associated with the error.- Returns:
- The created instance.
-
getSourceException
public IOException getSourceException()
Deprecated.Retrieves the underlying error whentype
isTYPE_SOURCE
.- Throws:
IllegalStateException
- Iftype
is notTYPE_SOURCE
.
-
getRendererException
public Exception getRendererException()
Deprecated.Retrieves the underlying error whentype
isTYPE_RENDERER
.- Throws:
IllegalStateException
- Iftype
is notTYPE_RENDERER
.
-
getUnexpectedException
public RuntimeException getUnexpectedException()
Deprecated.Retrieves the underlying error whentype
isTYPE_UNEXPECTED
.- Throws:
IllegalStateException
- Iftype
is notTYPE_UNEXPECTED
.
-
errorInfoEquals
public boolean errorInfoEquals(@Nullable PlaybackException that)
Deprecated.Description copied from class:PlaybackException
Returns whether the error data associated to this exception equals the error data associated toother
.Note that this method does not compare the exceptions' stacktraces.
- Overrides:
errorInfoEquals
in classPlaybackException
-
toBundle
public Bundle toBundle()
Deprecated.Returns aBundle
representing the information stored in this object.It omits the
mediaPeriodId
field. ThemediaPeriodId
of an instance restored byCREATOR
will always benull
.- Specified by:
toBundle
in interfaceBundleable
- Overrides:
toBundle
in classPlaybackException
-
-