docs/doc/reference/com/google/android/exoplayer2/MetadataRetriever.html
Package com.google.android.exoplayer2
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classMetadataRetrieverextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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.
Retrieves the static metadata of MediaItems.
All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static ListenableFuture<TrackGroupArray> | retrieveMetadata(Context context, MediaItem mediaItem) |
Deprecated.
Retrieves the TrackGroupArray corresponding to a MediaItem.
|
| static ListenableFuture<TrackGroupArray> | retrieveMetadata(MediaSource.Factory mediaSourceFactory, MediaItem mediaItem) |
Deprecated.
Retrieves the TrackGroupArray corresponding to a MediaItem.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[TrackGroupArray](source/TrackGroupArray.html "class in com.google.android.exoplayer2.source")> retrieveMetadata([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[MediaItem](MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Deprecated.
Retrieves the TrackGroupArray corresponding to a MediaItem.
This is equivalent to using retrieveMetadata(MediaSource.Factory, MediaItem) with a DefaultMediaSourceFactory and a DefaultExtractorsFactory with Mp4Extractor.FLAG_READ_MOTION_PHOTO_METADATA and Mp4Extractor.FLAG_READ_SEF_DATA set.
Parameters:context - The Context.mediaItem - The MediaItem whose metadata should be retrieved.Returns:A ListenableFuture of the result.
-
public static[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[TrackGroupArray](source/TrackGroupArray.html "class in com.google.android.exoplayer2.source")> retrieveMetadata([MediaSource.Factory](source/MediaSource.Factory.html "interface in com.google.android.exoplayer2.source")mediaSourceFactory,[MediaItem](MediaItem.html "class in com.google.android.exoplayer2")mediaItem)
Deprecated.
Retrieves the TrackGroupArray corresponding to a MediaItem.
This method is thread-safe.
Parameters:mediaSourceFactory - mediaSourceFactory The MediaSource.Factory to use to read the data.mediaItem - The MediaItem whose metadata should be retrieved.Returns:A ListenableFuture of the result.