Package com.google.android.exoplayer2
Class MediaItem.ClippingConfiguration.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem.ClippingConfiguration.Builder
-
- Enclosing class:
- MediaItem.ClippingConfiguration
public static final class MediaItem.ClippingConfiguration.Builder extends Object
Builder forMediaItem.ClippingConfiguration
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Constructs an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MediaItem.ClippingConfiguration
build()
Returns aMediaItem.ClippingConfiguration
instance initialized with the values of this builder.MediaItem.ClippingProperties
buildClippingProperties()
Deprecated.Usebuild()
instead.MediaItem.ClippingConfiguration.Builder
setEndPositionMs(long endPositionMs)
Sets the optional end position in milliseconds which must be a value larger than or equal to zero, orC.TIME_END_OF_SOURCE
to end when playback reaches the end of media (Default:C.TIME_END_OF_SOURCE
).MediaItem.ClippingConfiguration.Builder
setRelativeToDefaultPosition(boolean relativeToDefaultPosition)
Sets whether the start position and the end position are relative to the default position in the window (Default:false
).MediaItem.ClippingConfiguration.Builder
setRelativeToLiveWindow(boolean relativeToLiveWindow)
Sets whether the start/end positions should move with the live window for live streams.MediaItem.ClippingConfiguration.Builder
setStartPositionMs(long startPositionMs)
Sets the optional start position in milliseconds which must be a value larger than or equal to zero (Default: 0).MediaItem.ClippingConfiguration.Builder
setStartsAtKeyFrame(boolean startsAtKeyFrame)
Sets whether the start point is guaranteed to be a key frame.
-
-
-
Method Detail
-
setStartPositionMs
public MediaItem.ClippingConfiguration.Builder setStartPositionMs(@IntRange(from=0L) long startPositionMs)
Sets the optional start position in milliseconds which must be a value larger than or equal to zero (Default: 0).
-
setEndPositionMs
public MediaItem.ClippingConfiguration.Builder setEndPositionMs(long endPositionMs)
Sets the optional end position in milliseconds which must be a value larger than or equal to zero, orC.TIME_END_OF_SOURCE
to end when playback reaches the end of media (Default:C.TIME_END_OF_SOURCE
).
-
setRelativeToLiveWindow
public MediaItem.ClippingConfiguration.Builder setRelativeToLiveWindow(boolean relativeToLiveWindow)
Sets whether the start/end positions should move with the live window for live streams. Iffalse
, live streams end when playback reaches the end position in live window seen when the media is first loaded (Default:false
).
-
setRelativeToDefaultPosition
public MediaItem.ClippingConfiguration.Builder setRelativeToDefaultPosition(boolean relativeToDefaultPosition)
Sets whether the start position and the end position are relative to the default position in the window (Default:false
).
-
setStartsAtKeyFrame
public MediaItem.ClippingConfiguration.Builder setStartsAtKeyFrame(boolean startsAtKeyFrame)
Sets whether the start point is guaranteed to be a key frame. Iffalse
, the playback transition into the clip may not be seamless (Default:false
).
-
build
public MediaItem.ClippingConfiguration build()
Returns aMediaItem.ClippingConfiguration
instance initialized with the values of this builder.
-
buildClippingProperties
@Deprecated public MediaItem.ClippingProperties buildClippingProperties()
Deprecated.Usebuild()
instead.
-
-