# IllegalSeekPositionException

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

*** ** * ** ***


```
@UnstableApi
class IllegalSeekPositionException : IllegalStateException
```

<br />

|---|---|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) ||||||
| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.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) |||
|   |   |   | ↳ | [java.lang.IllegalStateException](https://developer.android.com/reference/java/lang/IllegalStateException.html) ||
|   |   |   |   | ↳ | [androidx.media3.common.IllegalSeekPositionException](https://developer.android.com/reference/kotlin/androidx/media3/common/IllegalSeekPositionException) |

*** ** * ** ***

Thrown when an attempt is made to seek to a position that does not exist in the player's `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/IllegalSeekPositionException#IllegalSeekPositionException(androidx.media3.common.Timeline,int,long)( timeline: https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline!, windowIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/IllegalSeekPositionException#positionMs()` The seek position in the specified window. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/IllegalSeekPositionException#timeline()` The `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` in which the seek was attempted. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/IllegalSeekPositionException#windowIndex()` The index of the window being seeked to. |

| ### Inherited functions |
|---|
| From [java.lang.Throwable](https://developer.android.com/reference/java/lang/Throwable.html) |---|---| | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/add-suppressed.html(exception: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/fill-in-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-cause.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-localized-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-message.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-stack-trace.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!>!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/get-suppressed.html()` | | `synchronized https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/init-cause.html(cause: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/index.html!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/print-stack-trace.html()` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/set-stack-trace.html(stackTrace: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://developer.android.com/reference/java/lang/StackTraceElement.html!>!)` | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-throwable/to-string.html()` | |

## Public constructors

### IllegalSeekPositionException

```
IllegalSeekPositionException(
    timeline: Timeline!,
    windowIndex: Int,
    positionMs: Long
)
```

| Parameters |
|---|---|
| `timeline: https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` in which the seek was attempted. |
| `windowIndex: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The index of the window being seeked to. |
| `positionMs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The seek position in the specified window. |

## Public properties

### positionMs

```
val positionMs: Long
```

The seek position in the specified window.

### timeline

```
val timeline: Timeline!
```

The `https://developer.android.com/reference/kotlin/androidx/media3/common/Timeline` in which the seek was attempted.

### windowIndex

```
val windowIndex: Int
```

The index of the window being seeked to.