Back to Exoplayer

MediaItem.ClippingConfiguration.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/MediaItem.ClippingConfiguration.Builder.html

latest5.8 KB
Original Source

Package com.google.android.exoplayer2

Class MediaItem.ClippingConfiguration.Builder


public static final classMediaItem.ClippingConfiguration.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Builder for MediaItem.ClippingConfiguration instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder() | Creates a new instance with default values. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | MediaItem.ClippingConfiguration | build() | Returns a MediaItem.ClippingConfiguration instance initialized with the values of this builder. | | MediaItem.ClippingProperties | buildClippingProperties() | Deprecated. Use build() 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, or C.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. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Creates a new instance with default values.

Method Detail

- 

setStartPositionMs

@CanIgnoreReturnValue
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")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

@CanIgnoreReturnValue
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")setEndPositionMs​(long endPositionMs)

Sets the optional end position in milliseconds which must be a value larger than or equal to zero, or C.TIME_END_OF_SOURCE to end when playback reaches the end of media (Default: C.TIME_END_OF_SOURCE).

- 

setRelativeToLiveWindow

@CanIgnoreReturnValue
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")setRelativeToLiveWindow​(boolean relativeToLiveWindow)

Sets whether the start/end positions should move with the live window for live streams. If false, live streams end when playback reaches the end position in live window seen when the media is first loaded (Default: false).

- 

setRelativeToDefaultPosition

@CanIgnoreReturnValue
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")setRelativeToDefaultPosition​(boolean relativeToDefaultPosition)

Sets whether the start position and the end position are relative to the default position in the window (Default: false).

- 

setStartsAtKeyFrame

@CanIgnoreReturnValue
public[MediaItem.ClippingConfiguration.Builder](MediaItem.ClippingConfiguration.Builder.html "class in com.google.android.exoplayer2")setStartsAtKeyFrame​(boolean startsAtKeyFrame)

Sets whether the start point is guaranteed to be a key frame. If false, the playback transition into the clip may not be seamless (Default: false).

- 

build

public[MediaItem.ClippingConfiguration](MediaItem.ClippingConfiguration.html "class in com.google.android.exoplayer2")build()

Returns a MediaItem.ClippingConfiguration instance initialized with the values of this builder.

- 

buildClippingProperties

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public[MediaItem.ClippingProperties](MediaItem.ClippingProperties.html "class in com.google.android.exoplayer2")buildClippingProperties()

Deprecated. Use build() instead.