Skip to content

androidx/media

v1.9.0-rc01 Breaking

This release includes 3 breaking changes for platform teams planning a safe upgrade.

Published 6mo Media Servers
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

android exoplayer java media3 media3-exoplayer media3-transformer
+1 more
mediaplayer

Summary

AI summary

Updates ExoPlayer, Extractors, and MP3 across a mixed release.

Full changelog
  • Common Library:
    • Fix auto-detection of TrackGroup track type by not ignoring custom sample MIME type and falling back to using the potentially wrong track type from the container MIME type (#2860).
  • ExoPlayer:
    • Add API to set and observe codec parameters for audio and video tracks. This feature is implemented for MediaCodec based renderers and requires API 29+.
      • Use ExoPlayer.setAudioCodecParameters() and ExoPlayer.setVideoCodecParameters() to apply parameters.
      • Use ExoPlayer.addAudioCodecParametersChangeListener() and ExoPlayer.addVideoCodecParametersChangeListener() to listen for changes. Observing vendor-specific keys requires API 31+.
    • Fix IllegalStateException caused by setting an empty media source after seeking to a non-zero position and then preparing the player with a non-empty media source.
    • Fix bug where seeking into other media items while in scrubbing mode could cause IllegalStateException.
    • Fix potential NullPointerException in DefaultPlaybackSessionManager (#2885).
    • Enable improvements in seeking performance for eligible videos.
    • Re-enable use of asynchronous decryption in MediaCodec on API 36+ where timeout issues with this platform API have been fixed (#1641).
    • Change the default value of MediaCodecVideoRenderer.experimentalSetLateThresholdToDropDecoderInputUs to 15ms and enable more efficient dropping of video frames before decoding for eligible videos.
    • Add maximum memory limit to the automatic memory calculation in DefaultLoadControl. This should only take effect if an excessive number of tracks get selected (#2860).
    • Fix bug where, if playing in a playlist or repeat mode, seeking in scrub mode near the end could cause a seek to the next media item.
  • Extractors:
    • MP3: Change Mp3Extractor to default to a constant bitrate (CBR) assumption when no seeking metadata (e.g., Xing, VBRI) is found, even when FLAG_ENABLE_INDEX_SEEKING is set. This is based on the MP3 specification's history, where CBR was standard and VBR requires explicit headers. This improves immediate seekability for files without metadata at the cost of potential accuracy for VBR files lacking headers. Index seeking is now used as a fallback if the CBR assumption is not seekable (e.g., for streams of unknown length) (#2848).
  • Inspector:
    • Add androidx.media3.inspector.MediaExtractorCompat, a drop-in replacement for the platform's android.media.MediaExtractor that provides a way to extract raw, encoded media samples from a media file. The existing androidx.media3.exoplayer.MediaExtractorCompat is now deprecated in favor of this new class.
  • Session:
    • Add backwards-compatibility for CommandButton instances using Player.Command or non-custom SessionCommand to define their action. These are now correctly represented in platform media sessions, for example for System UI or Android Auto.
    • Fix issue where the same Bitmap is compressed multiple times when connecting a MediaController to a platform media session.
  • HLS extension:
    • Properly handle fetching the next chunk for an HlsMediaPlaylist with no segments (#2821).
    • Use the default start position for pre rolls with live streams.
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • FFmpeg extension: Fix an issue that prevented some FLAC files from playing by ensuring the STREAMINFO block is correctly parsed and passed to the decoder (#2887).
  • Remove deprecated symbols:
    • Remove BitmapFactoryImageDecoder.BitmapDecoder. Use ExternallyLoadedImageDecoder instead.
    • Remove deprecated ShadowMediaCodecConfig.forAllSupportedMimeTypes(). Use ShadowMediaCodecConfig.withAllDefaultSupportedCodecs() instead.
    • Remove deprecated ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes(). Use ShadowMediaCodecConfig.withNoDefaultSupportedCodecs() instead.

Breaking Changes

  • Remove `BitmapFactoryImageDecoder.BitmapDecoder`; use `ExternallyLoadedImageDecoder` instead.
  • Remove deprecated `ShadowMediaCodecConfig.forAllSupportedMimeTypes()`; use `ShadowMediaCodecConfig.withAllDefaultSupportedCodecs()`.
  • Remove deprecated `ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes()`; use `ShadowMediaCodecConfig.withNoDefaultSupportedCodecs()`.

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track androidx/media

Get notified when new releases ship.

Sign up free

About androidx/media

All releases →

Beta — feedback welcome: [email protected]