docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.html
Package com.google.android.exoplayer2
All Implemented Interfaces:BundleableDirect Known Subclasses:MediaItem.ClippingPropertiesEnclosing class:MediaItem
public static classMediaItem.ClippingConfigurationextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](Bundleable.html "interface in com.google.android.exoplayer2")
Optionally clips the media item to a custom start and end position.
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static class | MediaItem.ClippingConfiguration.Builder |
Builder for MediaItem.ClippingConfiguration instances.
|
-
Bundleable.Creator<T extends Bundleable>
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Bundleable.Creator<MediaItem.ClippingProperties> | CREATOR |
An object that can restore MediaItem.ClippingConfiguration from a Bundle.
|
| long | endPositionMs |
The end position in milliseconds.
|
| boolean | relativeToDefaultPosition |
Whether startPositionMs and endPositionMs are relative to the default position.
|
| boolean | relativeToLiveWindow |
Whether the clipping of active media periods moves with a live window.
|
| long | startPositionMs |
The start position in milliseconds.
|
| boolean | startsAtKeyFrame |
Sets whether the start point is guaranteed to be a key frame.
|
| static MediaItem.ClippingConfiguration | UNSET |
A clipping configuration with default values.
|
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| MediaItem.ClippingConfiguration.Builder | buildUpon() |
Returns a MediaItem.ClippingConfiguration.Builder initialized with the values of this instance.
|
| boolean | equals(Object obj) | |
| int | hashCode() | |
| Bundle | toBundle() |
Returns a Bundle representing the information stored in this object.
|
-
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
public static final[MediaItem.ClippingConfiguration](MediaItem.ClippingConfiguration.html "class in com.google.android.exoplayer2")UNSET
A clipping configuration with default values.
-
@IntRange(from=0L)
public final long startPositionMs
The start position in milliseconds. This is a value larger than or equal to zero.
-
public final long endPositionMs
The end position in milliseconds. This is a value larger than or equal to zero or C.TIME_END_OF_SOURCE to play to the end of the stream.
-
public final boolean relativeToLiveWindow
Whether the clipping of active media periods moves with a live window. If false, playback ends when it reaches endPositionMs.
-
public final boolean relativeToDefaultPosition
Whether startPositionMs and endPositionMs are relative to the default position.
-
public final boolean startsAtKeyFrame
Sets whether the start point is guaranteed to be a key frame.
-
public static final[Bundleable.Creator](Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[MediaItem.ClippingProperties](MediaItem.ClippingProperties.html "class in com.google.android.exoplayer2")> CREATOR
An object that can restore MediaItem.ClippingConfiguration from a Bundle.
-
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")buildUpon()
Returns a MediaItem.ClippingConfiguration.Builder initialized with the values of this instance.
-
public boolean equals(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)
Overrides:equals in class Object
-
public int hashCode()
Overrides:hashCode in class Object
-
public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()
Description copied from interface: Bundleable
Returns a Bundle representing the information stored in this object.
Specified by:toBundle in interface Bundleable