# ClippingMediaSource.IllegalClippingException

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/source/ClippingMediaSource.java+class:androidx.media3.exoplayer.source.ClippingMediaSource.IllegalClippingException)

*** ** * ** ***


```
class ClippingMediaSource.IllegalClippingException : IOException
```

<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.io.IOException](https://developer.android.com/reference/java/io/IOException.html) ||
|   |   |   | ↳ | [androidx.media3.exoplayer.source.ClippingMediaSource.IllegalClippingException](https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException) |

*** ** * ** ***

Thrown when a `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource` cannot clip its wrapped source.

## 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/java/lang/annotation/ElementType.html#TYPE_USE) @https://developer.android.com/reference/kotlin/androidx/annotation/IntDef(value = ) annotation https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException.Reason` The reason clipping failed. |

| ### Constants |
|---|---|
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#REASON_INVALID_PERIOD_COUNT() = 0` The wrapped source doesn't consist of a single period. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#REASON_NOT_SEEKABLE_TO_START() = 1` The wrapped source is not seekable and a non-zero clipping start position was specified. |
| `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#REASON_START_EXCEEDS_END() = 2` The wrapped source ends before the specified clipping start position. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#IllegalClippingException(int)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html )` |
| `https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#IllegalClippingException(int,long,long)( @https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, startUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, endUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException.Reason https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException#reason()` The reason clipping failed. |

| ### 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()` | |

## Constants

### REASON_INVALID_PERIOD_COUNT

```
const val REASON_INVALID_PERIOD_COUNT = 0: Int
```

The wrapped source doesn't consist of a single period.

### REASON_NOT_SEEKABLE_TO_START

```
const val REASON_NOT_SEEKABLE_TO_START = 1: Int
```

The wrapped source is not seekable and a non-zero clipping start position was specified.

### REASON_START_EXCEEDS_END

```
const val REASON_START_EXCEEDS_END = 2: Int
```

The wrapped source ends before the specified clipping start position.

## Public constructors

### IllegalClippingException

```
IllegalClippingException(
    @ClippingMediaSource.IllegalClippingException.Reason reason: Int
)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/media3/exoplayer/source/ClippingMediaSource.IllegalClippingException.Reason reason: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The reason clipping failed. |

### IllegalClippingException

```
IllegalClippingException(
    @ClippingMediaSource.IllegalClippingException.Reason reason: Int,
    startUs: Long,
    endUs: Long
)
```

## Public properties

### reason

```
@ClippingMediaSource.IllegalClippingException.Reason
val reason: Int
```

The reason clipping failed.