mirror of
https://github.com/androidx/media.git
synced 2025-05-17 20:49:53 +08:00

Previously, `getTrackFormat()` in `MediaExtractorCompat` returned a `MediaFormat` without setting `MediaFormat.KEY_DURATION`. With this change: - `MediaFormat.KEY_DURATION` is set based on the track's duration, if available. - If the track duration is unset, the duration from the seek map is used as a fallback. - When neither duration is set, `MediaFormat.KEY_DURATION` remains unset. This ensures that `MediaFormat.KEY_DURATION` is populated when possible, enhancing duration information availability. PiperOrigin-RevId: 691395114
ExoPlayer module
This module provides ExoPlayer
, the Player
implementation for local media
playback on Android.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-exoplayer:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.