Package com.google.android.exoplayer2
Class MediaItem.ClippingConfiguration
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem.ClippingConfiguration
-
- All Implemented Interfaces:
Bundleable
- Direct Known Subclasses:
MediaItem.ClippingProperties
- Enclosing class:
- MediaItem
public static class MediaItem.ClippingConfiguration extends Object implements Bundleable
Optionally clips the media item to a custom start and end position.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMediaItem.ClippingConfiguration.BuilderBuilder forMediaItem.ClippingConfigurationinstances.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description static Bundleable.Creator<MediaItem.ClippingProperties>CREATORAn object that can restoreMediaItem.ClippingConfigurationfrom aBundle.longendPositionMsThe end position in milliseconds.booleanrelativeToDefaultPositionWhetherstartPositionMsandendPositionMsare relative to the default position.booleanrelativeToLiveWindowWhether the clipping of active media periods moves with a live window.longstartPositionMsThe start position in milliseconds.booleanstartsAtKeyFrameSets whether the start point is guaranteed to be a key frame.static MediaItem.ClippingConfigurationUNSETA clipping configuration with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaItem.ClippingConfiguration.BuilderbuildUpon()Returns aMediaItem.ClippingConfiguration.Builderinitialized with the values of this instance.booleanequals(Object obj)inthashCode()BundletoBundle()Returns aBundlerepresenting the information stored in this object.
-
-
-
Field Detail
-
UNSET
public static final MediaItem.ClippingConfiguration UNSET
A clipping configuration with default values.
-
startPositionMs
@IntRange(from=0L) public final long startPositionMs
The start position in milliseconds. This is a value larger than or equal to zero.
-
endPositionMs
public final long endPositionMs
The end position in milliseconds. This is a value larger than or equal to zero orC.TIME_END_OF_SOURCEto play to the end of the stream.
-
relativeToLiveWindow
public final boolean relativeToLiveWindow
Whether the clipping of active media periods moves with a live window. Iffalse, playback ends when it reachesendPositionMs.
-
relativeToDefaultPosition
public final boolean relativeToDefaultPosition
WhetherstartPositionMsandendPositionMsare relative to the default position.
-
startsAtKeyFrame
public final boolean startsAtKeyFrame
Sets whether the start point is guaranteed to be a key frame.
-
CREATOR
public static final Bundleable.Creator<MediaItem.ClippingProperties> CREATOR
An object that can restoreMediaItem.ClippingConfigurationfrom aBundle.
-
-
Method Detail
-
buildUpon
public MediaItem.ClippingConfiguration.Builder buildUpon()
Returns aMediaItem.ClippingConfiguration.Builderinitialized with the values of this instance.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-