Package com.google.android.exoplayer2
Class MediaItem
- java.lang.Object
-
- com.google.android.exoplayer2.MediaItem
-
- All Implemented Interfaces:
Bundleable
@Deprecated public final class MediaItem extends Object implements Bundleable
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Representation of a media item.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MediaItem.AdsConfiguration
Deprecated.Configuration for playing back linear ads with a media item.static class
MediaItem.Builder
Deprecated.A builder forMediaItem
instances.static class
MediaItem.ClippingConfiguration
Deprecated.Optionally clips the media item to a custom start and end position.static class
MediaItem.ClippingProperties
Deprecated.UseMediaItem.ClippingConfiguration
instead.static class
MediaItem.DrmConfiguration
Deprecated.DRM configuration for a media item.static class
MediaItem.LiveConfiguration
Deprecated.Live playback configuration.static class
MediaItem.LocalConfiguration
Deprecated.Properties for local playback.static class
MediaItem.RequestMetadata
Deprecated.Metadata that helps the player to understand a playback request represented by aMediaItem
.static class
MediaItem.Subtitle
Deprecated.UseMediaItem.SubtitleConfiguration
insteadstatic class
MediaItem.SubtitleConfiguration
Deprecated.Properties for a text track.-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description MediaItem.ClippingConfiguration
clippingConfiguration
Deprecated.The clipping properties.MediaItem.ClippingProperties
clippingProperties
Deprecated.UseclippingConfiguration
instead.static Bundleable.Creator<MediaItem>
CREATOR
Deprecated.static String
DEFAULT_MEDIA_ID
Deprecated.The default media ID that is used if the media ID is not explicitly set byMediaItem.Builder.setMediaId(String)
.static MediaItem
EMPTY
Deprecated.EmptyMediaItem
.MediaItem.LiveConfiguration
liveConfiguration
Deprecated.The live playback configuration.MediaItem.LocalConfiguration
localConfiguration
Deprecated.Optional configuration for local playback.String
mediaId
Deprecated.Identifies the media item.MediaMetadata
mediaMetadata
Deprecated.The media metadata.MediaItem.LocalConfiguration
playbackProperties
Deprecated.UselocalConfiguration
instead.MediaItem.RequestMetadata
requestMetadata
Deprecated.The mediaMediaItem.RequestMetadata
.
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_MEDIA_ID
public static final String DEFAULT_MEDIA_ID
Deprecated.The default media ID that is used if the media ID is not explicitly set byMediaItem.Builder.setMediaId(String)
.- See Also:
- Constant Field Values
-
mediaId
public final String mediaId
Deprecated.Identifies the media item.
-
localConfiguration
@Nullable public final MediaItem.LocalConfiguration localConfiguration
Deprecated.Optional configuration for local playback. May benull
if shared over process boundaries.
-
playbackProperties
@Deprecated @Nullable public final MediaItem.LocalConfiguration playbackProperties
Deprecated.UselocalConfiguration
instead.
-
liveConfiguration
public final MediaItem.LiveConfiguration liveConfiguration
Deprecated.The live playback configuration.
-
mediaMetadata
public final MediaMetadata mediaMetadata
Deprecated.The media metadata.
-
clippingConfiguration
public final MediaItem.ClippingConfiguration clippingConfiguration
Deprecated.The clipping properties.
-
clippingProperties
@Deprecated public final MediaItem.ClippingProperties clippingProperties
Deprecated.UseclippingConfiguration
instead.
-
requestMetadata
public final MediaItem.RequestMetadata requestMetadata
Deprecated.The mediaMediaItem.RequestMetadata
.
-
CREATOR
public static final Bundleable.Creator<MediaItem> CREATOR
Deprecated.An object that can restoreMediaItem
from aBundle
.The
localConfiguration
of a restored instance will always benull
.
-
-
Method Detail
-
fromUri
public static MediaItem fromUri(String uri)
Deprecated.Creates aMediaItem
for the given URI.- Parameters:
uri
- The URI.- Returns:
- An
MediaItem
for the given URI.
-
buildUpon
public MediaItem.Builder buildUpon()
Deprecated.Returns aMediaItem.Builder
initialized with the values of this instance.
-
toBundle
public Bundle toBundle()
Deprecated.Returns aBundle
representing the information stored in this object.It omits the
localConfiguration
field. ThelocalConfiguration
of an instance restored from such a bundle byCREATOR
will benull
.- Specified by:
toBundle
in interfaceBundleable
-
toBundleIncludeLocalConfiguration
public Bundle toBundleIncludeLocalConfiguration()
Deprecated.Returns aBundle
representing the information stored in thisMediaItem(java.lang.String, com.google.android.exoplayer2.MediaItem.ClippingProperties, com.google.android.exoplayer2.MediaItem.LocalConfiguration, com.google.android.exoplayer2.MediaItem.LiveConfiguration, com.google.android.exoplayer2.MediaMetadata, com.google.android.exoplayer2.MediaItem.RequestMetadata)
object, while including thelocalConfiguration
field if it is not null (otherwise skips it).
-
-