MediaItem.ClippingConfiguration


public class MediaItem.ClippingConfiguration

Known direct subclasses
MediaItem.ClippingProperties

This class is deprecated.

Use ClippingConfiguration instead.


Optionally clips the media item to a custom start and end position.

Summary

Nested types

Builder for ClippingConfiguration instances.

Constants

static final MediaItem.ClippingConfiguration

A clipping configuration with default values.

Public fields

final long

The end position in milliseconds.

final long

The end position in microseconds.

final boolean

Whether startPositionMs and endPositionMs are relative to the default position.

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

Sets whether the start point is guaranteed to be a key frame.

Public methods

MediaItem.ClippingConfiguration.Builder

Returns a Builder initialized with the values of this instance.

boolean
static MediaItem.ClippingProperties

Restores a ClippingProperties from a Bundle.

int
Bundle

Constants

UNSET

public static final MediaItem.ClippingConfiguration UNSET

A clipping configuration with default values.

Public fields

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

Sets 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.

equals

public boolean equals(@Nullable Object obj)

fromBundle

@UnstableApi
public static MediaItem.ClippingProperties fromBundle(Bundle bundle)

Restores a ClippingProperties from a Bundle.

hashCode

public int hashCode()

toBundle

@UnstableApi
public Bundle toBundle()