public class

MediaItem.ClippingConfiguration

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.ClippingConfiguration

Subclasses:

MediaItem.ClippingProperties

Overview

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

Summary

Fields
public final longendPositionMs

The end position in milliseconds.

public final longendPositionUs

The end position in microseconds.

public final booleanrelativeToDefaultPosition

Whether MediaItem.ClippingConfiguration.startPositionMs and MediaItem.ClippingConfiguration.endPositionMs are relative to the default position.

public final booleanrelativeToLiveWindow

Whether the clipping of active media periods moves with a live window.

public final longstartPositionMs

The start position in milliseconds.

public final longstartPositionUs

The start position in microseconds.

public final booleanstartsAtKeyFrame

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

public static final MediaItem.ClippingConfigurationUNSET

A clipping configuration with default values.

Methods
public MediaItem.ClippingConfiguration.BuilderbuildUpon()

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

public booleanequals(java.lang.Object obj)

public static MediaItem.ClippingPropertiesfromBundle(Bundle bundle)

Restores a ClippingProperties from a .

public inthashCode()

public BundletoBundle()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

Fields

public static final MediaItem.ClippingConfiguration UNSET

A clipping configuration with default values.

public final long startPositionMs

The start position in milliseconds. This is a value larger than or equal to zero.

public final long startPositionUs

The start position in microseconds. This is a value larger than or equal to zero.

public final long endPositionMs

The end position in milliseconds. This is a value larger than or equal to zero or C.TIME_END_OF_SOURCE to play to the end of the stream.

public final long endPositionUs

The end position in microseconds. This is a value larger than or equal to zero or C.TIME_END_OF_SOURCE to play to the end of the stream.

public final boolean relativeToLiveWindow

Whether the clipping of active media periods moves with a live window. If false, playback ends when it reaches MediaItem.ClippingConfiguration.endPositionMs.

public final boolean relativeToDefaultPosition

Whether MediaItem.ClippingConfiguration.startPositionMs and MediaItem.ClippingConfiguration.endPositionMs are relative to the default position.

public final boolean startsAtKeyFrame

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

Methods

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

public boolean equals(java.lang.Object obj)

public int hashCode()

public Bundle toBundle()

public static MediaItem.ClippingProperties fromBundle(Bundle bundle)

Restores a ClippingProperties from a .