Class PlaybackException

    • Field Detail

      • ERROR_CODE_UNSPECIFIED

        public static final int ERROR_CODE_UNSPECIFIED
        Deprecated.
        Caused by an error whose cause could not be identified.
        See Also:
        Constant Field Values
      • ERROR_CODE_REMOTE_ERROR

        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
      • ERROR_CODE_BEHIND_LIVE_WINDOW

        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
      • ERROR_CODE_TIMEOUT

        public static final int ERROR_CODE_TIMEOUT
        Deprecated.
        Caused by a generic timeout.
        See Also:
        Constant Field Values
      • ERROR_CODE_FAILED_RUNTIME_CHECK

        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
      • ERROR_CODE_IO_UNSPECIFIED

        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
      • ERROR_CODE_IO_NETWORK_CONNECTION_FAILED

        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()).
        • 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
      • ERROR_CODE_IO_NETWORK_CONNECTION_TIMEOUT

        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
      • ERROR_CODE_IO_INVALID_HTTP_CONTENT_TYPE

        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
      • ERROR_CODE_IO_BAD_HTTP_STATUS

        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
      • ERROR_CODE_IO_FILE_NOT_FOUND

        public static final int ERROR_CODE_IO_FILE_NOT_FOUND
        Deprecated.
        Caused by a non-existent file.
        See Also:
        Constant Field Values
      • ERROR_CODE_IO_NO_PERMISSION

        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
      • ERROR_CODE_IO_CLEARTEXT_NOT_PERMITTED

        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
      • ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE

        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
      • ERROR_CODE_PARSING_CONTAINER_MALFORMED

        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
      • ERROR_CODE_PARSING_MANIFEST_MALFORMED

        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
      • ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED

        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
      • ERROR_CODE_PARSING_MANIFEST_UNSUPPORTED

        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
      • ERROR_CODE_DECODER_INIT_FAILED

        public static final int ERROR_CODE_DECODER_INIT_FAILED
        Deprecated.
        Caused by a decoder initialization failure.
        See Also:
        Constant Field Values
      • ERROR_CODE_DECODER_QUERY_FAILED

        public static final int ERROR_CODE_DECODER_QUERY_FAILED
        Deprecated.
        Caused by a decoder query failure.
        See Also:
        Constant Field Values
      • ERROR_CODE_DECODING_FAILED

        public static final int ERROR_CODE_DECODING_FAILED
        Deprecated.
        Caused by a failure while trying to decode media samples.
        See Also:
        Constant Field Values
      • ERROR_CODE_DECODING_FORMAT_EXCEEDS_CAPABILITIES

        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
      • ERROR_CODE_DECODING_FORMAT_UNSUPPORTED

        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
      • ERROR_CODE_AUDIO_TRACK_INIT_FAILED

        public static final int ERROR_CODE_AUDIO_TRACK_INIT_FAILED
        Deprecated.
        Caused by an AudioTrack initialization failure.
        See Also:
        Constant Field Values
      • ERROR_CODE_AUDIO_TRACK_WRITE_FAILED

        public static final int ERROR_CODE_AUDIO_TRACK_WRITE_FAILED
        Deprecated.
        Caused by an AudioTrack write operation failure.
        See Also:
        Constant Field Values
      • ERROR_CODE_DRM_UNSPECIFIED

        public static final int ERROR_CODE_DRM_UNSPECIFIED
        Deprecated.
        Caused by an unspecified error related to DRM protection.
        See Also:
        Constant Field Values
      • ERROR_CODE_DRM_SCHEME_UNSUPPORTED

        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
      • ERROR_CODE_DRM_PROVISIONING_FAILED

        public static final int ERROR_CODE_DRM_PROVISIONING_FAILED
        Deprecated.
        Caused by a failure while provisioning the device.
        See Also:
        Constant Field Values
      • ERROR_CODE_DRM_CONTENT_ERROR

        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
      • ERROR_CODE_DRM_LICENSE_ACQUISITION_FAILED

        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
      • ERROR_CODE_DRM_DISALLOWED_OPERATION

        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
      • ERROR_CODE_DRM_SYSTEM_ERROR

        public static final int ERROR_CODE_DRM_SYSTEM_ERROR
        Deprecated.
        Caused by an error in the DRM system.
        See Also:
        Constant Field Values
      • ERROR_CODE_DRM_DEVICE_REVOKED

        public static final int ERROR_CODE_DRM_DEVICE_REVOKED
        Deprecated.
        Caused by the device having revoked DRM privileges.
        See Also:
        Constant Field Values
      • ERROR_CODE_DRM_LICENSE_EXPIRED

        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
      • ERROR_CODE_VIDEO_FRAME_PROCESSOR_INIT_FAILED

        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
      • ERROR_CODE_VIDEO_FRAME_PROCESSING_FAILED

        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
      • CUSTOM_ERROR_CODE_BASE

        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

        @ErrorCode
        public final @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode
        Deprecated.
        An error code which identifies the cause of the playback failure.
    • Constructor Detail

      • PlaybackException

        public PlaybackException​(@Nullable
                                 String message,
                                 @Nullable
                                 Throwable cause,
                                 @ErrorCode
                                 @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().
      • PlaybackException

        protected PlaybackException​(Bundle bundle)
        Deprecated.
        Creates a new instance using the fields obtained from the given Bundle.
      • PlaybackException

        protected PlaybackException​(@Nullable
                                    String message,
                                    @Nullable
                                    Throwable cause,
                                    @ErrorCode
                                    @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode,
                                    long timestampMs)
        Deprecated.
        Creates a new instance using the given values.
    • Method Detail

      • getErrorCodeName

        public static String getErrorCodeName​(@ErrorCode
                                              @com.google.android.exoplayer2.PlaybackException.ErrorCode int errorCode)
        Deprecated.
        Returns the name of a given errorCode.
      • errorInfoEquals

        @CallSuper
        public boolean errorInfoEquals​(@Nullable
                                       PlaybackException 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.

      • toBundle

        @CallSuper
        public Bundle toBundle()
        Deprecated.
        Description copied from interface: Bundleable
        Returns a Bundle representing the information stored in this object.
        Specified by:
        toBundle in interface Bundleable