MediaItem.LocalConfiguration


public final class MediaItem.LocalConfiguration


Properties for local playback.

Summary

Public fields

final @Nullable MediaItem.AdsConfiguration

Optional ads configuration.

final @Nullable String

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

final @Nullable MediaItem.DrmConfiguration

Optional DrmConfiguration for the media.

final long

Duration for image assets in milliseconds.

final @Nullable String

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

final List<StreamKey>

Optional stream keys by which the manifest is filtered.

final ImmutableList<MediaItem.SubtitleConfiguration>

Optional subtitles to be sideloaded.

final List<MediaItem.Subtitle>

This field is deprecated.

Use subtitleConfigurations instead.

final @Nullable Object

Optional tag for custom attributes.

final Uri

The Uri.

Public methods

boolean
static MediaItem.LocalConfiguration

Restores a LocalConfiguration from a Bundle.

int
Bundle

Returns a Bundle representing the information stored in this object.

Public fields

adsConfiguration

public final @Nullable MediaItem.AdsConfiguration adsConfiguration

Optional ads configuration.

customCacheKey

@UnstableApi
public final @Nullable String customCacheKey

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

drmConfiguration

public final @Nullable MediaItem.DrmConfiguration drmConfiguration

Optional DrmConfiguration for the media.

imageDurationMs

@UnstableApi
public final long imageDurationMs

Duration for image assets in milliseconds.

mimeType

public final @Nullable 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.

streamKeys

@UnstableApi
public final List<StreamKeystreamKeys

Optional stream keys by which the manifest is filtered.

subtitleConfigurations

public final ImmutableList<MediaItem.SubtitleConfigurationsubtitleConfigurations

Optional subtitles to be sideloaded.

subtitles

@UnstableApi
public final List<MediaItem.Subtitlesubtitles

tag

public final @Nullable 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.

uri

public final Uri uri

The Uri.

Public methods

equals

public boolean equals(@Nullable Object obj)

fromBundle

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

Restores a LocalConfiguration from a Bundle.

hashCode

public int hashCode()

toBundle

@UnstableApi
public Bundle toBundle()

Returns a Bundle representing the information stored in this object.

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