# ExoTimeoutException

Artifact: [androidx.media3:media3-exoplayer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/exoplayer/ExoTimeoutException.java+class:androidx.media3.exoplayer.ExoTimeoutException)

*** ** * ** ***


```
@UnstableApi
public final class ExoTimeoutException extends RuntimeException
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [kotlin.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) ||||
|   | ↳ | [java.lang.Exception](https://developer.android.com/reference/java/lang/Exception.html) |||
|   |   | ↳ | [java.lang.RuntimeException](https://developer.android.com/reference/java/lang/RuntimeException.html) ||
|   |   |   | ↳ | [androidx.media3.exoplayer.ExoTimeoutException](https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException) |

*** ** * ** ***

A timeout of an operation on the ExoPlayer playback thread.

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/java/lang/annotation/Documented.html @https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE) @https://developer.android.com/reference/java/lang/annotation/Target.html(value = ) @https://developer.android.com/reference/androidx/annotation/IntDef(value = ) public annotation https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException.TimeoutOperation` The operation which produced the timeout error. |

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#TIMEOUT_OPERATION_DETACH_SURFACE() = 3` The error occurred while detaching a surface from the player. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#TIMEOUT_OPERATION_RELEASE() = 1` The error occurred in `https://developer.android.com/reference/androidx/media3/common/Player#release()`. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#TIMEOUT_OPERATION_SET_FOREGROUND_MODE() = 2` The error occurred in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setForegroundMode(boolean)`. |
| `static final int` | `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#TIMEOUT_OPERATION_UNDEFINED() = 0` The operation where this error occurred is not defined. |

| ### Public fields |
|---|---|
| `final int` | `@https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException.TimeoutOperation https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#timeoutOperation()` The operation on the ExoPlayer playback thread that timed out. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException#ExoTimeoutException(int)( @https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException.TimeoutOperation int timeoutOperation )` Creates the timeout exception. |

### Inherited methods

From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) `synchronized final void` `https://developer.android.com/reference/java/lang/Throwable.html#addSuppressed(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html exception)` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#fillInStackTrace()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#getCause()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getLocalizedMessage()()` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#getMessage()()` `StackTraceElement[]` `https://developer.android.com/reference/java/lang/Throwable.html#getStackTrace()()` `synchronized final Throwable[]` `https://developer.android.com/reference/java/lang/Throwable.html#getSuppressed()()` `synchronized https://developer.android.com/reference/java/lang/Throwable.html` `https://developer.android.com/reference/java/lang/Throwable.html#initCause(java.lang.Throwable)(https://developer.android.com/reference/java/lang/Throwable.html cause)` `void` `https://developer.android.com/reference/java/lang/Throwable.html#printStackTrace()()` `void` `https://developer.android.com/reference/java/lang/Throwable.html#setStackTrace(java.lang.StackTraceElement[])(StackTraceElement[] stackTrace)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/java/lang/Throwable.html#toString()()`

## Constants

### TIMEOUT_OPERATION_DETACH_SURFACE

```
public static final int TIMEOUT_OPERATION_DETACH_SURFACE = 3
```

The error occurred while detaching a surface from the player.

### TIMEOUT_OPERATION_RELEASE

```
public static final int TIMEOUT_OPERATION_RELEASE = 1
```

The error occurred in `https://developer.android.com/reference/androidx/media3/common/Player#release()`.

### TIMEOUT_OPERATION_SET_FOREGROUND_MODE

```
public static final int TIMEOUT_OPERATION_SET_FOREGROUND_MODE = 2
```

The error occurred in `https://developer.android.com/reference/androidx/media3/exoplayer/ExoPlayer#setForegroundMode(boolean)`.

### TIMEOUT_OPERATION_UNDEFINED

```
public static final int TIMEOUT_OPERATION_UNDEFINED = 0
```

The operation where this error occurred is not defined.

## Public fields

### timeoutOperation

```
@ExoTimeoutException.TimeoutOperation
public final int timeoutOperation
```

The operation on the ExoPlayer playback thread that timed out.

## Public constructors

### ExoTimeoutException

```
public ExoTimeoutException(
    @ExoTimeoutException.TimeoutOperation int timeoutOperation
)
```

Creates the timeout exception.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException.TimeoutOperation int timeoutOperation` | The `https://developer.android.com/reference/androidx/media3/exoplayer/ExoTimeoutException.TimeoutOperation` that produced the timeout. |