Skip to content

Releases: androidx/media

1.10.0-alpha01

09 Feb 10:05
d017af2

Choose a tag to compare

1.10.0-alpha01 Pre-release
Pre-release
  • Common Library:
    • Promote Player.mute() and Player.unmute() from UnstableApi to stable.
    • Promote Format.pcmEncoding and C.PcmEncoding from UnstableApi to stable.
  • ExoPlayer:
    • Add clipping capabilities to AdsMediaSource.
    • Add support for dynamic scheduling in MediaCodecVideoRenderer to better align scheduling work and CPU wake-cycles to when video frames can be processed. You can enable this using experimentalSetEnableMediaCodecVideoRendererDurationToProgressUs() via the DefaultRenderersFactory.
    • Allow setting a custom DataSource.Factory in DefaultPreloadManager.Builder.
    • Allow ExoPlayer to be mocked without Robolectric by moving some default constants to ExoPlayer.Builder. Mocking this complex interface is not generally encouraged - only when the usage is minimal/simple/incidental (#2985).
      • This required moving DEFAULT_STUCK_PLAYING_DETECTION_TIMEOUT_MS from ExoPlayer to ExoPlayer.Builder (without deprecation).
    • Fix bug where ProgressiveMediaSource propagates out-of-date timeline info to player and the queued periods unexpectedly get removed (#3016).
  • CompositionPlayer:
    • Add support for EditedMediaItem.removeVideo.
  • Transformer:
    • EditedMediaItem.Builder.setFrameRate() can now set a maximum output frame rate for video, which is particularly helpful when increasing media speed with setSpeed().
  • Inspector:
    • Breaking change: Removed FrameExtractor. Users should now depend on the new :media3-inspector-frame module and update imports to androidx.media3.inspector.frame.FrameExtractor.
  • Inspector Frame:
    • Introduced a new module for extracting and processing decoded video frames.
  • Audio:
    • Change underlying decoding library for IAMF decoder extension from libiamf to iamf_tools.
    • IAMF decoding supports binaural output either through the decoder (when using the IAMF decoder extension) or through the Android Spatializer.
    • Correctly remove support for AC4Profile22 and other legacy profiles when assessing AC-4 decoder support in Automotive scenarios (#2609).
    • Improve the retry logic of AudioOutput initialization in DefaultAudioSink (#2905).
  • Text:
    • VobSub: Use START and STOP SPU control commands to derive cue duration instead of always defaulting to 5s (#2935).
  • Effect:
    • Moved LottieOverlay to a new :media3-effect-lottie module (which also involved renaming it from androidx.media3.effect.LottieOverlay to androidx.media3.effect.lottie.LottieOverlay).
  • Effect Lottie:
    • Introduced a new :media3-effect-lottie module which provides functionality for applying lottie effects to video frames.
  • IMA extension:
    • Update the IMA SDK version to 3.39.0 in order to have access to the latest Ad media info API.
    • Bug fix: Corrected an issue where the ad MIME type did not match the MIME type provided in the IMA LOADED event. The fix now maps the ad MIME type using the ad media info provided by IMA.
    • Added setEnableCustomTabs to ImaAdsLoader and ImaServerSideAdInsertionMediaSource, allowing users to control whether ad click-through URLs are launched using Custom Tabs.
    • Add the ImaAdTagUriBuilder, a class that offers an alternative way to construct an adTagUri. It contains the setPreferredLinearOrientation API. This is an API in alpha testing that will allow you to set your preferred orientation for linear ads. If you wish to join the alpha testing group, please reach out to your account partner.
  • Session:
    • Fix bug where large arrays in MediaMetadata.artworkData can crash the app.
    • Use type int for @Player.Command argument in the ActionFactory interface (#2933).
    • Make MediaSessionService and MediaLibraryService a LifecycleService, more easily allowing to attach lifecycle-aware operations to the service's lifecycle (#187).
    • Stop supporting device volume change commands from MediaController and MediaBrowser for local playbacks. Apps should not change the local device volume, and if required, can use AudioManager APIs for this purpose.
    • Detect stale Intent instances that started the service as a foreground service. This prevents a ForegroundServiceDidNotStartInTimeException being thrown by the system. This is a breaking change on an unstable API for apps implementing a custom MediaNotification.Provider as there is a new required method.
    • Add builders for PendingIntent instances to be used with home screen widgets (#2933).
    • Add static methods for creating Intent instances for Compose-based home screen widgets (#2933).
    • Fix bug where the media item transition wasn't reported to controllers when playback transitioned from a given media item index to another with the same media item for discontinuity reason AUTO and SEEK (#2997).
  • UI:
    • Add PlaybackSpeedControl Composable to media3-ui-compose for displaying and modifying playback speed.
    • Add PlaybackSpeedToggleButton Composable to media3-ui-compose-material3 for controlling playback speed.
    • Add ProgressSlider Composable to media3-ui-compose-material3 for displaying player progress and performing seeks using dragging and tapping (#2288).
    • Avoid large offscreen buffer in animating PlayerControlView.
  • HLS extension:
    • Support X-PLAYOUT-LIMIT with HLS interstitials (#2484).
    • Support the QUERYPARAM attribute with #EXT-X-DEFINE (#1854).
    • Optimize HLS playlist parsing by caching regex Matchers (#3008).
  • Cast extension:
    • Add RemoteCastPlayer.Builder#setTrackSelector method that enables the implementation of track selection for Cast playbacks.
  • Remove deprecated symbols:
    • Removed ExperimentalFrameExtractor. Use androidx.media3.inspector.frame.FrameExtractor instead.
    • Removed ChannelMixingMatrix.create(). Use ChannelMixingMatrix.createForConstantGain() instead.

1.9.2

06 Feb 10:36

Choose a tag to compare

  • ExoPlayer:
    • Fix bug where ProgressiveMediaSource propagates out-of-date timeline info to player and the queued periods unexpectedly get removed (#3016).
  • Session:
    • Fix issue where system UI button placement workaround negatively affects other UI surface like Android Auto or manufacturers not needing the workaround (#3041).
  • Cast extension:
    • Fix bug where transferring from Cast to local playback was broken.

1.9.1

26 Jan 11:27

Choose a tag to compare

  • Common Library:
    • Support date-time strings with only hours in the timezone offset (#2929).
  • ExoPlayer:
    • Allow dynamic scheduling to slow doSomeWork interval only after audio starts to support smoother A/V sync at beginning of playback.
    • Fix bug in DefaultLoadErrorHandlingPolicy where FileNotFoundException and similar exception types were retried multiple times.
    • Fix bug with dynamic scheduling where the calculated time for the next doSomeWork was mistakenly reduced by the elapsed time of the current iteration of doSomeWork. Addressing this hopefully extends CPU idle time and saves power.
    • Fix issue where some playbacks of Dolby Vision files fail when attempting to use a fallback AVC or HEVC codec.
    • Fix bug where loading continues after playback ended when removing the currently playing item from a playlist (#2873).
    • Avoid leaking MediaItem instances when repeatedly using ExoPlayer.replaceMediaItem on the same item (#2993).
    • Prevent potential ANRs caused by emergency wake lock releases (#2979).
  • Extractors:
    • MP3: Parse LAME ReplayGain data (#2840).
  • Audio:
    • Correctly remove support for AC4Profile22 and other legacy profiles when assessing AC-4 decoder support in Automotive scenarios (#2609).
  • Video:
    • Discard video codecs on devices below API 30 when the content frame rate changes to avoid stuttering playback (#2941).
  • Text:
    • VobSub: Fix some missing subtitles by correctly handling SPUs that either contain only a single control sequence, or have critical info split across multiple control sequences (#2935).
  • IMA extension:
    • Bug fix: Corrected an issue where the ad MIME type did not match the MIME type provided in the IMA LOADED event. The fix now maps the ad MIME type using the ad pod index and ad position.
    • Add a null check before accessing result of getAdsManager() and AdEvent.getAd().
  • Session:
    • Fix bug where stopping a MediaController connected to a platform session crashed the app if stop happened during ad playback (#2948).
    • Add additional verifications on extras Bundle instances in various classes to guard against malformed Bundle instances sent from other processes.
    • Fix issue where missing commands for COMMAND_SEEK_NEXT or COMMAND_SEEK_BACK can cause gaps in the system media notification (#2976).
    • Move bitmap scaling for notification icon off the main thread (#2829).
    • Fix bug where author, writer and composer were not used as a fallback when converting from legacy MediaMetadataCompat and MediaDescriptionCompat (#3018).
  • Downloads:
    • Fix potential infinite loops when a PriorityTooLowException is handled by SegmentDownloader (for DASH, HLS and SmoothStreaming). Custom overrides of SegmentDownloader using the protected execute method need to provide their task wrapped in a Supplier so it can be recreated (#2931).
  • HLS extension:
    • Pass the raw asset list JSON document to Listener.onAssetListLoadCompleted callback. This is a breaking change in an unstable API that requires apps that implement this callback to add an additional argument of type JSONObject (#2950).
  • RTSP extension:
    • Correctly handle RTP Packets with timestamps that wrap around (#2930).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Fix potential NullPointerException that can occur when seeking prior to processing the first video frame (#2965).
  • Cast extension:
    • Fix bug preventing the RemoteCastPlayer timeline from updating correctly when replacing the playlist.

1.9.0

17 Dec 21:21

Choose a tag to compare

1.9.0 (2025-12-17)

  • Common Library:
    • Update minSdk to 23 in line with other AndroidX libraries.
    • Add PlayerTransferState, which facilitates transferring the playback state across Player instances.
    • Add void mute() and void unmute() methods to Player that preserve and consequently restore Player's volume before and after setting it to zero.
    • Publish utility classes WakeLockManager, WifiLockManager, AudioFocusManager, AudioBecomingNoisyManager and StuckPlayerDetector previously used by ExoPlayer internally to allow reuse for other players (#1893).
    • Fix ForwardingPlayer listener handling when the underlying delegate player uses reference equality for comparing listener instances (#2675).
    • Add a Player.listenTo suspending extension function in the media3-common-ktx library that specifies the particular Player.Events that should be acted upon.
    • Fix a crash in BasePlayer.getBufferedPercentage resulting from integer overflow when the reported buffered position is implausibly much larger than the reported duration (#2750).
    • 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 a stuck player detection that triggers a StuckPlayerException player error if the player seems stuck. This happens in the following cases, where each default timeout can be configured in ExoPlayer.Builder if required:
      • After 10 minutes of STATE_BUFFERING while trying to play and no buffering progress.
      • After 10 seconds of STATE_READY while trying to play and no playback progress.
      • After 1 minute of STATE_READY beyond the declared duration without reaching the end of the item.
      • After 10 minutes with a playback suppression reason while trying to play.
    • Enable wake lock handling by default to fix issues with buffering during background playback. This is equivalent to setting ExoPlayer.Builder.setWakeMode to C.WAKE_MODE_LOCAL.
    • Add listening logic to automatically update the virtual device ID when a change is reported to the Context originally passed to ExoPlayer.Builder.
    • Add ExoPlayer.setVirtualDeviceId to manually update the virtual device ID obtained from the Context passed to ExoPlayer.Builder.
    • Ensure renderers don't consume data from the next playlist item more than 10 seconds before the end of the current item.
    • Add setSeekBackIncrementMs, setSeekForwardIncrementMs and setMaxSeekToPreviousPositionMs to ExoPlayer to update these settings after construction (#2736).
    • Add pre-caching functionality in DefaultPreloadManager. Apps now can return DefaultPreloadManager.PreloadStatus.specifiedRangeCached(startPositionMs, durationMs) or DefaultPreloadManager.PreloadStatus.specifiedRangeCached(durationMs) via TargetPreloadStatusControl.getTargetPreloadStatus(T rankingData) to indicate that a media item needs to be pre-cached.
    • Use pre-caching functionality of DefaultPreloadManager in shortform demo app.
    • Add DefaultLoadControl.Builder setters for local playback and adjust default values of DefaultLoadControl to work well with a wide range of local files.
    • Fix bug where setting an empty playlist can leave the player in STATE_READY or STATE_BUFFERING.
    • Enhance the preload manager APIs:
      • Add addMediaItems(List<MediaItem>, List<T>) and addMediaSources(List<MediaSource>, List<T>) that add the media items or media sources in batch, and automatically call invalidate() afterwards.
      • Add removeMediaItems((List<MediaItem>) and removeMediaSources(List<MediaSource>) that remove the media items or media sources in batch, and make sure that preload manager does not start to preload or continue preloading any of them after removal.
      • Allow DefaultPreloadManager.setCurrentPlayingIndex(int) to invalidate itself automatically. Apps don't need to call invalidate() explicitly anymore after updating the current playing index.
    • Add capability to skip keyframe reset for forward seeks within the same group of pictures while in scrubbing mode.
    • Add DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int) for apps to set a value of target buffer bytes for a player with the specified playerName. The DefaultLoadControl can now make decisions of each player separately based on its own allocated bytes and target buffer bytes.
    • Add SkipInfo to the AdPlaybackState.AdGroup to carry skip information for each ad in the ad group.
    • Fix bug where calling removeMediaItems(List) during playing a post-roll created a crash (#2746).
    • Fix some stuttering in playlist playback where frames were mistakenly always set as the last sample and rendered.
    • Enable retry path if player fails to generate audio session ID (#2382, #2678).
    • Add support to control the total buffer bytes for the sources in DefaultPreloadManager to avoid total buffer bytes for preloading from growing arbitrarily. To use the default control logic, Apps can set the target buffer bytes for preloading via DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int) for a playerName of PlayerId.Preload.name ("preload"), and inject the created DefaultLoadControl via DefaultPreloadManager.Builder.setLoadControl(LoadControl).
    • Add cloneAndSet(int, int) to ShuffleOrder with a default implementation (#2834).
    • Append content resume offset when skipping ad playback after seek adjustment or auto transition (#2484).
    • 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.
  • CompositionPlayer:
    • Publish CompositionPlayer under a new @ExperimentalApi annotation to indicate it is available for experimentation, but is still under development. Some APIs are likely to change significantly in future releases, and there are known issues and limitations with some use-cases (some undocumented).
    • Add support for COMMAND_SET_AUDIO_ATTRIBUTES and audio focus handling in CompositionPlayer.
    • Add support for speed changing in secondary sequences in CompositionPlayer.
    • Add support for EditedMediaItem.removeVideo.
  • Transformer:
    • Use InAppMp4Muxer as default muxer.
    • Add EditedMediaItem.Builder#setSpeed() and deprecate Effects#createExperimentalSpeedChangingEffects().
    • Replace forceAudioTrack and forceVideoTrack with trackTypes in EditedMediaItemSequence.
  • Track Selection:
    • Add TrackSelectionParameters.selectTextByDefault to prefer the selection of any text track without specifying other more specific preferences.
    • Add preferredVideoLabels, preferredAudioLabels and preferredTextLabels in TrackSelectionParameters to specify a preference for tracks with a specific label, for example those read from HLS NAME tags (#1666).
  • Extractors:
    • FLAC: Tighten header detection to reduce the chance of finding spurious headers in the encoded FLAC data, resulting in decoding errors (#558).
    • MP3: Allow gaps between (and before) ID3 tags at the beginning of MP3 files (#811, #5718).
    • MP3: Increase sniffing limit to 128kB to match the existing search limit for a sync byte (#2713).
    • MP3: Change FLAG_ENABLE_INDEX_SEEKING to prefer seeking informatio...
Read more

1.9.0-rc01

04 Dec 10:36

Choose a tag to compare

  • 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.

1.9.0-beta01

20 Nov 10:45

Choose a tag to compare

1.9.0-beta01 Pre-release
Pre-release
  • ExoPlayer:
    • Add cloneAndSet(int, int) to ShuffleOrder with a default implementation (#2834).
    • Append content resume offset when skipping ad playback after seek adjustment or auto transition (2484).
  • Extractors:
    • MP3: Increase sniffing limit to 128kB to match the existing search limit for a sync byte (#2713).
  • Video:
    • Re-enable workaround for wrongly reported performance points for secure codecs (#2856).
  • Effect:
    • Add Presentation.copyWithUnsetSideRoundedTo to round the unset output side when Presentation is created with a single side length.
  • IMA extension:
    • Fix issue where content preparation error for content after an ad would be wrongly reported as an ad playback error (#2656).
  • Session:
    • Add CommandButton.executeAction so that controllers can more easily trigger the intended action. Also allow to specify parameters for some player and session commands to define which action to trigger.
  • UI:
    • Use BidiFormatter to correctly display punctuation in RTL text subtitles (#11214).
    • Add TimeText composable to media3-ui-compose-material3 for displaying player progress in a textual form. It can be configured to show the current position, duration, or remaining time.
  • HLS extension:
    • Add HlsInterstitialsAdsLoader.skipCurrentAd() and skipCurrentAdGroup() and corresponding methods to skip ads and ad groups by index.
    • Add HlsInterstitialsAdsLoader.Listener.onAdStarted to report the start of an ad period (#2859).
    • Accept space as a date/time separator in ISO 8601 date-time strings.

1.9.0-alpha01

22 Oct 20:48

Choose a tag to compare

1.9.0-alpha01 Pre-release
Pre-release
  • Common Library:
    • Update minSdk to 23 in line with other AndroidX libraries.
    • Add PlayerTransferState, which facilitates transferring the playback state across Player instances.
    • Add void mute() and void unmute() methods to Player that preserve and consequently restore Player's volume before and after setting it to zero.
    • Publish utility classes WakeLockManager, WifiLockManager, AudioFocusManager, AudioBecomingNoisyManager and StuckPlayerDetector previously used by ExoPlayer internally to allow reuse for other players (#1893).
    • Fix ForwardingPlayer listener handling when the underlying delegate player uses reference equality for comparing listener instances (#2675).
    • Add a Player.listenTo suspending extension function in the media3-common-ktx library that specifies the particular Player.Events that should be acted upon.
    • Fix a crash in BasePlayer.getBufferedPercentage resulting from integer overflow when the reported buffered position is implausibly much larger than the reported duration (#2750).
  • ExoPlayer:
    • Add a stuck player detection that triggers a StuckPlayerException player error if the player seems stuck. This happens in the following cases, where each default timeout can be configured in ExoPlayer.Builder if required:
      • After 10 minutes of STATE_BUFFERING while trying to play and no buffering progress.
      • After 10 seconds of STATE_READY while trying to play and no playback progress.
      • After 1 minute of STATE_READY beyond the declared duration without reaching the end of the item.
      • After 10 minutes with a playback suppression reason while trying to play.
    • Enable wake lock handling by default to fix issues with buffering during background playback. This is equivalent to setting ExoPlayer.Builder.setWakeMode to C.WAKE_MODE_LOCAL.
    • Add listening logic to automatically update the virtual device ID when a change is reported to the Context originally passed to ExoPlayer.Builder.
    • Add ExoPlayer.setVirtualDeviceId to manually update the virtual device ID obtained from the Context passed to ExoPlayer.Builder.
    • Ensure renderers don't consume data from the next playlist item more than 10 seconds before the end of the current item.
    • Add setSeekBackIncrementMs, setSeekForwardIncrementMs and setMaxSeekToPreviousPositionMs to ExoPlayer to update these settings after construction (#2736).
    • Add pre-caching functionality in DefaultPreloadManager. Apps now can return DefaultPreloadManager.PreloadStatus.specifiedRangeCached(startPositionMs, durationMs) or DefaultPreloadManager.PreloadStatus.specifiedRangeCached(durationMs) via TargetPreloadStatusControl.getTargetPreloadStatus(T rankingData) to indicate that a media item needs to be pre-cached.
    • Use pre-caching functionality of DefaultPreloadManager in shortform demo app.
    • Add DefaultLoadControl.Builder setters for local playback and adjust default values of DefaultLoadControl to work well with a wide range of local files.
    • Fix bug where setting an empty playlist can leave the player in STATE_READY or STATE_BUFFERING.
    • Enhance the preload manager APIs:
      • Add addMediaItems(List<MediaItem>, List<T>) and addMediaSources(List<MediaSource>, List<T>) that add the media items or media sources in batch, and automatically call invalidate() afterwards.
      • Add removeMediaItems((List<MediaItem>) and removeMediaSources(List<MediaSource>) that remove the media items or media sources in batch, and make sure that preload manager does not start to preload or continue preloading any of them after removal.
      • Allow DefaultPreloadManager.setCurrentPlayingIndex(int) to invalidate itself automatically. Apps don't need to call invalidate() explicitly anymore after updating the current playing index.
    • Add capability to skip keyframe reset for forward seeks within the same group of pictures while in scrubbing mode.
    • Add DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int) for apps to set a value of target buffer bytes for a player with the specified playerName. The DefaultLoadControl can now make decisions of each player separately based on its own allocated bytes and target buffer bytes.
    • Add SkipInfo to the AdPlaybackState.AdGroup to carry skip information for each ad in the ad group.
    • Fix bug where calling removeMediaItems(List) during playing a post-roll created a crash (#2746).
    • Fix some stuttering in playlist playback where frames were mistakenly always set as the last sample and rendered.
    • Enable retry path if player fails to generate audio session ID (#2382, #2678).
    • Add support to control the total buffer bytes for the sources in DefaultPreloadManager to avoid total buffer bytes for preloading from growing arbitrarily. To use the default control logic, Apps can set the target buffer bytes for preloading via DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int) for a playerName of PlayerId.Preload.name ("preload"), and inject the created DefaultLoadControl via DefaultPreloadManager.Builder.setLoadControl(LoadControl).
  • CompositionPlayer:
    • Publish CompositionPlayer under a new @ExperimentalApi annotation to indicate it is available for experimentation, but is still under development. Some APIs are likely to change significantly in future releases, and there are known issues and limitations with some use-cases (some undocumented).
    • Add support for COMMAND_SET_AUDIO_ATTRIBUTES and audio focus handling in CompositionPlayer.
    • Add support for speed changing in secondary sequences in CompositionPlayer.
  • Transformer:
    • Use InAppMp4Muxer as default muxer.
    • Add EditedMediaItem.Builder#setSpeed() and deprecate Effects#createExperimentalSpeedChangingEffects().
    • Replace forceAudioTrack and forceVideoTrack with trackTypes in EditedMediaItemSequence.
  • Track Selection:
    • Add TrackSelectionParameters.selectTextByDefault to prefer the selection of any text track without specifying other more specific preferences.
    • Add preferredVideoLabels, preferredAudioLabels and preferredTextLabels in TrackSelectionParameters to specify a preference for tracks with a specific label, for example those read from HLS NAME tags (#1666).
  • Extractors:
    • FLAC: Tighten header detection to reduce the chance of finding spurious headers in the encoded FLAC data, resulting in decoding errors (#558).
    • MP3: Allow gaps between (and before) ID3 tags at the beginning of MP3 files (#811, #5718).
    • MP4: Disambiguate between audio/mpeg (MP3), audio/mpeg-L1 and audio/mpeg-L2 MIME types by peeking the layer value of the first sample before emitting a track format from the extractor (#2683).
    • MP4: Improve sniffing efficiency of very large files by assuming a stbl box larger than 1MB implies the file must be non-fragmented (#2650).
    • Matroska: Add support for DTS-HD detection (#6225).
    • Fix an issue in MatroskaExtractor where seeking could be inaccurate for files with multiple tracks. Cue points are now correctly associated with their respective tracks, leading to more precise seeking.
    • MP4: Add support for ©mvn (movement name) and ©mvi (movement index) metadata, these are now emitted as TextInformationFrame objects in Format.metadata with IDs of MVNM and MVIN respectively (#2754).
    • MPEG-TS: Fix IllegalArgumentException from ReorderingBufferQueue caused by PES packets with no timestamp (#2764).
    • MP4: Ignore tracks with missing stsd box (instead of failing to parse the whole file).
    • Add support for extracting HEIC Motion Photos. The HeifExtractor can now parse HEIC files containing embedded video and audio tracks.
    • MP3: Change FLAG_ENABLE_INDEX_SEEKING to prefer seeking information from metadata headers (like Xing and VBRI) when available, falling back to index-based seeking if no other seeking information is present. This improves performance for files with seeking metadata (#2839).
  • Inspector:
    • Introduced a new :media3-inspector module to serve as the dedicated home for media inspection utilities. This module now houses a new androidx.media3.inspector.MetadataRetriever, which will provide a unified API for both metadata and frame extraction. The existing androidx.media3.exoplayer.MetadataRetriever is now deprecated in favor of this new version.
    • Introduced androidx.media3.inspector.FrameExtractor, a new public API for frame extraction. This AutoCloseable class provides a way to extract frames with support for HDR video, video effects, and custom decoder selection. It should be created via its Builder for a specific MediaItem.
    • FrameExtractor: Add getThumbnail() to extract a representative thumbnail frame from a media file without ...
Read more

1.8.0

30 Jul 18:13

Choose a tag to compare

This release includes the following changes since the 1.7.1 release:

  • Common Library:
    • Add support for replacing the player in ForwardingSimpleBasePlayer.
  • ExoPlayer:
    • Add getter for shuffle mode to the ExoPlayer interface (#2522).
    • More clearly throw an exception if DefaultAudioSink is accessed from multiple threads. If this happens due to a call to RendererCapabilities.getFormatSupport outside of the player, make sure to call this method on the same thread as ExoPlayer's playback thread or use a different instance than the one used for playback (#1191).
    • Fix bug where non-stereo audio formats on TVs may be marked as unsupported by DefaultTrackSelector.
    • Ensure the last frame is correctly rendered when using MediaCodec's DECODE_ONLY flag (which is enabled by default in scrubbing mode).
    • Add support for using the virtual device ID from the Context passed to ExoPlayer.Builder.
    • Enable dynamic scheduling by default in scrubbing mode.
    • Avoid unnecessary reload of a source when seeking to the end of an item.
    • Use MediaCodec.BUFFER_FLAG_DECODE_ONLY by default in scrubbing mode.
    • Throw IllegalStateException when PreloadMediaSource is played by an ExoPlayer with a playback thread that is different than the preload thread (#2495).
    • Add cloneAndMove to ShuffleMode with a default implementation (#2226).
    • Change default behavior of Renderer.getMinDurationToProgressUs to return a larger value if no call to render is required.
    • Fix bug where internal scheduling delayed last frame when seeking to the end while paused. For now, the bug fix only takes effect if ExoPlayer.Builder.experimentalSetDynamicSchedulingEnabled is enabled.
    • Add ExoPlayer.setScrubbingModeEnabled(boolean) method. This optimizes the player for many frequent seeks (for example, from a user dragging a scrubber bar around). The behavior of scrubbing mode can be customized with setScrubbingModeParameters(..) on ExoPlayer and ExoPlayer.Builder.
    • Allow customizing fractional seek tolerance in scrubbing mode.
    • Increase codec operating rate in scrubbing mode.
    • Fix bug where prepare errors in the content of AdsMediaSource may be never reported (#2337).
    • Fix memory leak in MergingMediaSource, for example used when sideloading subtitles (#2338).
    • Allow CmcdConfiguration.Factory to return null to disable CMCD logging for specific media items (#2386).
    • Increase default image buffer size from 128kB (copy-paste mistake from text tracks) to 26MB, which is large enough for 50MP Ultra HDR images (#2417).
    • Add PreCacheHelper that allows apps to pre-cache a single media with specified start position and duration.
    • Add support of preloading from specified position in DefaultPreloadManager.
  • Transformer:
    • Add CodecDbLite that enables chipset specific optimizations of video encoding settings.
    • Add setEnableCodecDbLite flag to the DefaultEncoderFactory to enable CodecDB Lite settings optimization. By default, this flag is set to false.
    • Filling an initial gap (added via addGap()) with silent audio now requires explicitly setting experimentalSetForceAudioTrack(true) in EditedMediaItemSequence.Builder. If the gap is in the middle of the sequence, then this flag is not required.
    • Move Muxer interface from media3-transformer to media3-muxer.
    • Make setting MediaItem.Builder().setImageDuration(long) mandatory to import a media item as an image.
    • Add Transformer.Builder().experimentalSetMp4EditListTrimEnabled(boolean) which includes an MP4 edit list when trimming to instruct players to ignore samples between the key frame before the trim start point, and the trim start point.
    • Update Composition Demo app to use Kotlin and Jetpack Compose, and add a custom VideoCompositorSettings to arrange sequences into a 2x2 or PiP layout.
  • Extractors:
    • Parse metadata from fragmented MP4 files (#2084).
    • JPEG: Support motion photos that don't have an Exif segment at the start (#2552).
    • Add support for seeking in fragmented MP4 with multiple sidx atoms. This behavior can be enabled using the FLAG_MERGE_FRAGMENTED_SIDX flag on FragmentedMp4Extractor (#9373).
    • Ignore empty seek tables in FLAC files (including those containing only placeholder seek points), and fall back to binary search seeking if the duration of the file is known (#2327).
    • Fix parsing of H.265 SEI units to fully skip unrecognized SEI types (#2456).
    • Update WavExtractor to use the header extension's SubFormat data for the audio format when parsing a WAVE_FORMAT_EXTENSIBLE type file.
    • MP4: Add support for ipcm and fpcm boxes defining raw PCM audio tracks (64-bit floating point PCM is not supported).
    • MP4: Handle the rotation part of tkhd transformation matrices that both rotate and reflect the video. This ensures that reflected videos taken by the iPhone front facing camera display the right way up, but incorrectly reflected in the y-axis (#2012).
    • MP3: Use duration and data size from unseekable Xing, VBRI and similar variable bitrate metadata when falling back to constant bitrate seeking due to FLAG_ENABLE_CONSTANT_BITRATE_SEEKING(_ALWAYS) (#2194).
  • Audio:
    • Fix bug where AnalyticsListener.onAudioPositionAdvancing is not called when the audio playback is started very close to the end of the media.
    • Add support for all linear PCM sample formats in ChannelMappingAudioProcessor and TrimmingAudioProcessor.
    • Add support for audio gaps in CompositionPlayer.
    • Remove spurious call to BaseAudioProcessor#flush() from BaseAudioProcessor#reset().
    • Allow constant power upmixing/downmixing in DefaultAudioMixer.
    • Make ChannelMappingAudioProcessor, TrimmingAudioProcessor and ToFloatPcmAudioProcessor public (#2339).
    • Use AudioTrack#getUnderrunCount() in AudioTrackPositionTracker to detect underruns in DefaultAudioSink instead of best-effort estimation.
    • Improve audio timestamp smoothing for unexpected position drift from the audio output device.
    • Fix bug where A/V sync is broken for the first 10 seconds after resuming from pause when connected to Bluetooth devices.
    • Fix bug that AnalyticsListener.onAudioPositionAdvancing was not reporting the time when the audio started advancing but the time of the first measurement.
    • Fix recovery to multichannel audio after fallback to stereo audio on some devices (#2258).
  • Video:
    • Extend detached surface workaround to "lenovo" and "motorola" devices (#2059).
    • Improve smooth video frame release at startup when audio samples don't start at exactly the requested position.
    • Extend detached surface workaround to "realme" devices (#2059).
    • Add experimental ExoPlayer API to include the MediaCodec.BUFFER_FLAG_DECODE_ONLY flag when queuing decode-only input buffers. This flag will signal the decoder to skip the decode-only buffers thereby resulting in faster seeking. Enable it with DefaultRenderersFactory.experimentalSetEnableMediaCodecBufferDecodeOnlyFlag.
    • Improve codec performance checks for software video codecs. This may lead to some additional tracks being marked as EXCEEDS_CAPABILITIES.
    • Fix VP9 Widevine playback errors on some devices (#2408).
  • Text:
    • Add support for VobSub tracks in MP4 files (#2510).
    • Fix a playback stall when a subtitle segment initially fails to load and later loads successfully, followed by several empty subtitle segments (#2517).
    • Fix SSA and SubRip to display an in-progress cue when enabling subtitles (#2309).
    • Fix playback getting stuck when switching from a stream with a subtitle error to a live stream with an empty subtitle track (#2328).
    • Fix garbled CEA-608 subtitles when playing H.262 streams containing B-frames (#2372).
    • Add support for SSA subtitles with CodecId = S_TEXT/SSA in Matroska files. Previously MatroskaExtractor only supported CodecId = S_TEXT/ASS which is meant to represent the 'advanced' (v4+) variant of SubStation Alpha subtitles (but ExoPlayer's parsing logic is the same for both variants) (#2384).
    • Add support for the layer property in SubStation Alpha (SSA) subtitle files which is used to define the z-order of cues when more than one is shown on screen at the same time (#2124).
  • Metadata:
    • Added support for retrieving media duration and Timeline to MetadataRetriever and migrate...
Read more

1.8.0-rc02

25 Jul 09:28

Choose a tag to compare

This release includes the following changes since the 1.8.0-rc01 release:

  • ExoPlayer:
    • Add getter for shuffle mode to the ExoPlayer interface (#2522).
    • More clearly throw an exception if DefaultAudioSink is accessed from multiple threads. If this happens due to a call to RendererCapabilities.getFormatSupport outside of the player, make sure to call this method on the same thread as ExoPlayer's playback thread or use a different instance than the one used for playback (#1191).
  • Audio:
    • Fix bug where AnalyticsListener.onAudioPositionAdvancing is not called when the audio playback is started very close to the end of the media.
  • Session:
    • Fix bug where connections from third-party non-privileged Media3 controllers are ignored.
    • Remove check for available commands when sending custom commands to a legacy MediaBrowserServiceCompat. This is in parity with the behavior of legacy controllers/browsers when connected to a legacy app.
    • Fix a bug that causes a player's first playback error to be incorrectly treated as a persistent custom exception. This prevents the application from recovering.
  • HLS extension:
    • Fix bug where HlsSampleStreamWrapper attempts to seek inside buffer when there are no chunks available in the buffer #2598.

1.8.0-rc01

16 Jul 15:49

Choose a tag to compare

This release includes the following changes since the 1.8.0-beta01 release:

  • ExoPlayer:
    • Fix bug where non-stereo audio formats on TVs may be marked as unsupported by DefaultTrackSelector.
    • Ensure the last frame is correctly rendered when using MediaCodec's DECODE_ONLY flag (which is enabled by default in scrubbing mode).
  • Extractors:
    • Parse metadata from fragmented MP4 files (#2084).
    • JPEG: Support motion photos that don't have an Exif segment at the start (#2552).
  • Video:
    • Extend detached surface workaround to "lenovo" and "motorola" devices (#2059).
  • Text:
    • Add support for VobSub tracks in MP4 files (#2510).
  • DRM:
    • Add new overload of OfflineLicenseHelper.newWidevineInstance accepting a MediaItem.DrmConfiguration so that HTTP request headers can be applied correctly (#2169).
  • Session:
    • Fix bug where some controller changes that are not handled by the session may cause IllegalStateExceptions.
    • Fix bug where controller actions that are not handled by the session may leave the controller in an invalid state.
    • Fix StrictMode unsafe launch violation warning (#2330).
  • UI:
    • Fix bug where PlayerSurface inside re-usable components like LazyColumn didn't work correctly (#2493).
  • HLS extension:
    • Fix bug where track selection changes after loading low-latency parts and preload hints can cause playback to get stuck or freeze (#2299).
    • Prevent excessive reloads by waiting for half the target duration when CAN-BLOCK-RELOAD=YES is not honored by the server (#2317).
    • Fix bug where playback was stalled when starting an interstitials stream before a mid roll and asset list resolution was attempted for the wrong ad (#2558).
  • DASH extension:
    • Fix issue where trick-play adaptation set is merged with its main adaptation set to form an invalid TrackGroup (#2148).
  • RTSP extension:
    • Add support for RTP Aggregation Packet for H265 in accordance with RFC 7798#4.4.2 (#2413).