public final class

MediaItem.LocalConfiguration

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.MediaItem.LocalConfiguration

Overview

Properties for local playback.

Summary

Fields
public final MediaItem.AdsConfigurationadsConfiguration

Optional ads configuration.

public final java.lang.StringcustomCacheKey

Optional custom cache key (only used for progressive streams).

public final MediaItem.DrmConfigurationdrmConfiguration

Optional MediaItem.DrmConfiguration for the media.

public final longimageDurationMs

Duration for image assets in milliseconds.

public final java.lang.StringmimeType

The optional MIME type of the item, or null if unspecified.

public final java.util.List<StreamKey>streamKeys

Optional stream keys by which the manifest is filtered.

public final <any>subtitleConfigurations

Optional subtitles to be sideloaded.

public final java.util.List<MediaItem.Subtitle>subtitles

public final java.lang.Objecttag

Optional tag for custom attributes.

public final Uriuri

The .

Methods
public booleanequals(java.lang.Object obj)

public static MediaItem.LocalConfigurationfromBundle(Bundle bundle)

Restores a LocalConfiguration from a .

public inthashCode()

public BundletoBundle()

Returns a representing the information stored in this object.

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

Fields

public final Uri uri

The .

public final java.lang.String mimeType

The optional MIME type of the item, or null if unspecified.

The MIME type can be used to disambiguate media items that have a URI which does not allow to infer the actual media type.

public final MediaItem.DrmConfiguration drmConfiguration

Optional MediaItem.DrmConfiguration for the media.

public final MediaItem.AdsConfiguration adsConfiguration

Optional ads configuration.

public final java.util.List<StreamKey> streamKeys

Optional stream keys by which the manifest is filtered.

public final java.lang.String customCacheKey

Optional custom cache key (only used for progressive streams).

public final <any> subtitleConfigurations

Optional subtitles to be sideloaded.

public final java.util.List<MediaItem.Subtitle> subtitles

Deprecated: Use MediaItem.LocalConfiguration.subtitleConfigurations instead.

public final java.lang.Object tag

Optional tag for custom attributes. The tag for the media source which will be published in the androidx.media3.common.Timeline of the source as androidx.media3.common.Timeline.Window#tag.

public final long imageDurationMs

Duration for image assets in milliseconds.

Methods

public boolean equals(java.lang.Object obj)

public int hashCode()

public Bundle toBundle()

Returns a representing the information stored in this object.

It omits the MediaItem.LocalConfiguration.tag field. The MediaItem.LocalConfiguration.tag of an instance restored from such a bundle by MediaItem.LocalConfiguration.fromBundle(Bundle) will be null.

public static MediaItem.LocalConfiguration fromBundle(Bundle bundle)

Restores a LocalConfiguration from a .