MediaItem.ClippingConfiguration
public class MediaItem.ClippingConfiguration
MediaItem.ClippingProperties |
This class is deprecated. Use |
Optionally clips the media item to a custom start and end position.
Summary
Nested types |
|---|
public final class MediaItem.ClippingConfiguration.BuilderBuilder for |
Constants |
|
|---|---|
static final MediaItem.ClippingConfiguration |
A clipping configuration with default values. |
Public fields |
|
|---|---|
final boolean |
Whether clipping to a non-zero start position in unseekable media is allowed. |
final long |
The end position in milliseconds. |
final long |
The end position in microseconds. |
final boolean |
Whether |
final boolean |
Whether the clipping of active media periods moves with a live window. |
final @IntRange(from = 0) long |
The start position in milliseconds. |
final @IntRange(from = 0) long |
The start position in microseconds. |
final boolean |
Whether the start point is guaranteed to be a key frame. |
Public methods |
|
|---|---|
MediaItem.ClippingConfiguration.Builder |
Returns a |
boolean |
|
static MediaItem.ClippingProperties |
@UnstableApiRestores a |
int |
hashCode() |
Bundle |
Constants
UNSET
public static final MediaItem.ClippingConfiguration UNSET
A clipping configuration with default values.
Public fields
allowUnseekableMedia
@UnstableApi
public final boolean allowUnseekableMedia
Whether clipping to a non-zero start position in unseekable media is allowed.
endPositionMs
public final long endPositionMs
The end position in milliseconds. This is a value larger than or equal to zero or TIME_END_OF_SOURCE to play to the end of the stream.
endPositionUs
@UnstableApi
public final long endPositionUs
The end position in microseconds. This is a value larger than or equal to zero or TIME_END_OF_SOURCE to play to the end of the stream.
relativeToDefaultPosition
public final boolean relativeToDefaultPosition
Whether startPositionMs and endPositionMs are relative to the default position.
relativeToLiveWindow
public final boolean relativeToLiveWindow
Whether the clipping of active media periods moves with a live window. If false, playback ends when it reaches endPositionMs.
startPositionMs
public final @IntRange(from = 0) long startPositionMs
The start position in milliseconds. This is a value larger than or equal to zero.
startPositionUs
@UnstableApi
public final @IntRange(from = 0) long startPositionUs
The start position in microseconds. This is a value larger than or equal to zero.
startsAtKeyFrame
public final boolean startsAtKeyFrame
Whether the start point is guaranteed to be a key frame.
Public methods
buildUpon
public MediaItem.ClippingConfiguration.Builder buildUpon()
Returns a Builder initialized with the values of this instance.
fromBundle
@UnstableApi
public static MediaItem.ClippingProperties fromBundle(Bundle bundle)
Restores a ClippingProperties from a Bundle.