Update dependency androidx.media3:media3-exoplayer to v1.10.1 #27

Open
renovate wants to merge 1 commit from renovate/androidx.media3-media3-exoplayer-1.x into main
Member

This PR contains the following updates:

Package Type Update Change
androidx.media3:media3-exoplayer dependencies minor 1.4.11.10.1

Release Notes

androidx/media (androidx.media3:media3-exoplayer)

v1.10.1

Compare Source

This release includes the following changes since 1.10.0:

  • Common library:
    • Fix handling of onAudioSessionIdChanged in SimpleBasePlayer and
      ForwardingSimpleBasePlayer.
  • ExoPlayer:
    • Fix race condition related to audio session id generation that could
      lead to an IllegalStateException with tunneling mode.
      (#​3099).
    • Fix possible app crashes when recovering from decoder errors with
      renderer prewarming.
    • Fix issue where video artifacts were caused by supplying initialization
      data when using an AV1-based Dolby Vision codec
      (#​3153).
  • Track selection:
    • Adjust track selection logic in VideoTrackInfo to resolve fallback
      MIME types and move HDR and codec score preferences to quality
      preferences (#​3135).
  • Extractors:
    • MP3: Ignore Xing data length if it is longer than the known stream
      length (#​3117).
    • Fix ArrayIndexOutOfBoundsException in Mp4Extractor when
      FLAG_OMIT_TRACK_SAMPLE_TABLE is set and the track lacks a sync sample
      (stss) box.
  • Audio:
    • Fix bug where audio events may be misrouted if multiple audio renderers
      are added to the player.
  • Video:
    • Adjust logic for codec reuse at frame rate changes on API below 30 to
      avoid codec resets where they are not beneficial
      (#​3120).
    • Disable forced synchronization workaround in queueSecureInputBuffer
      for API 31+. The workaround was an artificial bottleneck that forced
      decryption to run serially which prevented garbled video due to a
      framework issue existing prior to API 31.
  • Image:
    • Fix issue in scrubbing mode where image updates would only take effect
      when the user "stops scrubbing"
      (#​2815).
  • Session:
    • Fix bug where ForegroundServiceStartNotAllowedException wasn't
      propagated across thread boundaries in case the application thread is
      not the main thread
      (#​2499).
    • Fix bug where COMMAND_SEEK_TO_MEDIA_ITEM is not available in a
      MediaController when connecting to a platform-only session that
      supports seeking to other items but no playlist modifications.
    • Fix issue where MediaController can't set media items on platform
      media sessions that don't allow PREPARE_FROM actions.
    • Fix bug where own process wasn't marked with Controller.isTrusted() on
      API 27 or before when connecting via platform controllers.
  • HLS extension:
    • Fix a bug where an ArrayIndexOutOfBoundsException is thrown during
      stream fallback if the track selection is a subset of the available
      tracks (#​3161).
    • Fix an issue where the initialization segment was not carried over
      across media playlist updates if the #EXT-X-MAP tag was not repeated
      in subsequent updates
      (#​3105).
  • DASH extension:
    • Fix crash in SampleQueue when seeking into a chunk that is currently
      being canceled.

v1.10.0

Compare Source

This release includes the following changes since
1.9.1 release:

  • Common library:
    • Promote Player.mute() and Player.unmute() from UnstableApi to
      stable.
    • Promote Format.pcmEncoding and C.PcmEncoding from UnstableApi to
      stable.
    • Add Format.primaryTrackGroupId to identify the primary group of
      embedded Format instances
      (#​294).
  • 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() in
      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 a bug where ProgressiveMediaSource propagates out-of-date timeline
      info to the player, and the queued periods unexpectedly get removed
      (#​3016).
    • Fix issue where ExoPlayer would not request delayed audio focus when
      playback is requested during phone calls.
    • Fix bug where transitions from on-demand to live content may cause
      re-buffers at the end of the on-demand content
      (#​3052).
    • Add support for Dolby Vision Profile 10
      (#​2830).
    • Fix bug where an uninitialized pre roll ad produced an
      ArrayIndexOutOfBoundsException
      (#​3125).
  • 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().
  • Track selection:
    • Change signature of DefaultTrackSelector.selectAllTracks to include
      the output array as a parameter, pre-populated with track overrides.
    • Fix issue where embedded metadata tracks are selected irrespective of
      whether the corresponding primary track is selected
      (#​294).
    • Stabilize TrackSelectionParameters options for
      preferredVideoLanguages, preferredVideoLabels,
      preferredAudioLabels, preferredTextLabels and selectTextByDefault.
  • Extractors:
    • MP4: Support files with large uuid boxes before other boxes like
      moov (#​3046).
    • MP4: Add support for Versatile Video Coding (VVC) tracks in MP4
      containers.
  • Inspector:
    • Breaking change: remove FrameExtractor. Users should now depend on the
      new :media3-inspector-frame module and update imports to
      androidx.media3.inspector.frame.FrameExtractor.
    • Introduce a new module for extracting and processing decoded video
      frames.
  • Audio:
    • Change underlying decoding library for the 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).
    • Attempt to match the output layout of the speakers (or Spatializer if
      applicable) when decoding IAMF, both with the IAMF extension and media
      codec decoders, supported by new fields and logic in AudioCapabilities
      and AudioCapabilitiesReceiver.
    • Fix bug where playback gets stuck when playing a playlist of gapless
      audio in compressed offload mode.
  • Text:
    • VobSub: Use START and STOP SPU control commands to derive cue
      duration instead of always defaulting to 5 seconds
      (#​2935).
  • Metadata:
    • Increase default count of metadata renderers to four to cover all
      potential metadata tracks published by HLS variants and renditions
      (#​3043).
  • Effect:
    • Move 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:
    • Introduce 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.
    • Fix a bug 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.
    • Add 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 want to join the alpha
      testing group, please reach out to your account partner.
  • Session:
    • Fix a 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, 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 shouldn't 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 a 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).
    • Fix issue where system UI button placement workaround negatively affects
      other UI surface like Android Auto or manufacturers not needing the
      workaround (#​3041).
    • Fix issue where access to subscriptions was not synchronized
      (#​3056).
    • Workaround SysUI bug on API 29 where media session artwork in a
      particular size can crash SysUI and force the device to reboot
      (#​3118).
    • Fix notification artwork icon scaling on Android Q
      (#​3084).
  • 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.
    • Add Player Composable to media3-ui-compose-material3 which combines
      a ContentFrame with customizable controls aligned to top, center, and
      bottom.
    • Hide playback position from the accessibility service to prevent
      continuous announcement update when PlayerControlView is visible.
  • 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 regular expression matchers
      (#​3008).
    • Expose ID3 (EMSG) metadata track in audio renditions
      (#​3043).
    • Allow location fallback upon encountering load errors, if redundant
      streams from different locations are available
      (#​1988).
    • Fix X-SNAP behaviour for HLS interstitials to correctly calculate start
      and resumption position
      (#​3013).
  • DASH extension:
    • Fix issue where tracks with unaligned segment start times cause delays
      or missed samples at the beginning of playback
      (#​3057).
    • Fix bug where timestamps of inband EMSG v0 metadata are not set
      correctly (#​3024).
  • RTSP extension:
    • Fixed regression in H.264 and H.265 streaming that would incorrectly
      parse samples of the same access unit that spanned multiple RTP packets.
      This resulted in visual artifacts and corruption in the video
      (#​3121).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Add MPEG-H UI manager support to the MPEG-H decoder extension
      (#​3066).
  • Cast extension:
    • Add RemoteCastPlayer.Builder#setTrackSelector method that enables the
      implementation of track selection for Cast playbacks.
  • Remove deprecated symbols:
    • Remove ExperimentalFrameExtractor. Use
      androidx.media3.inspector.frame.FrameExtractor instead.
    • Remove ChannelMixingMatrix.create(). Use
      ChannelMixingMatrix.createForConstantGain() instead.
    • Remove androidx.media3.extractor.metadata.flac.VorbisComment. Use
      androidx.media3.extractor.metadata.vorbis.VorbisComment instead.
    • Remove MediaSource.prepareSource(MediaSourceCaller, TransferListener).
      Use MediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId) instead.

v1.9.4

Compare Source

  • Effect:
    • Explicitly set GL_DRAW_BUFFER and GL_READ_BUFFER when transitioning from surfaceless context.

v1.9.3

Compare Source

  • Audio:
    • Fix bug where playback gets stuck when playing a playlist of gapless audio in compressed offload mode.

v1.9.2

Compare Source

This release includes the following changes since
1.9.1 release:

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

v1.9.1

Compare Source

This release includes the following changes since
1.9.0 release:

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

v1.9.0

Compare Source

  • 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 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).
    • 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).
    • 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).
    • 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).
    • MP4: Ignore tracks with missing stsd box (instead of failing to parse
      the whole file).
    • 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.
    • MPEG-TS: Fix IllegalArgumentException from ReorderingBufferQueue
      caused by PES packets with no timestamp
      (#​2764).
    • Add support for extracting HEIC Motion Photos. The HeifExtractor can
      now parse HEIC files containing embedded video and audio tracks.
  • 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 requiring a specific
      timestamp.
    • 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.
  • Audio:
    • Make AudioProcessor instances aware of seeking.
    • Allow injecting the new AudioOutputProvider interface into
      DefaultAudioSink.Builder to support custom audio output paths. The
      default is AudioTrackAudioOutputProvider.
    • Handle seeks in GainProcessor.
    • Utilize AC-4 decoder profile and level capabilities in track format
      support assessment
      (#​2580).
    • Avoid potential delays caused by handling routing change callbacks at
      the beginning of playback
      (#​2646).
    • Allow codec reuse for EAC3, EAC3-JOC and AC-4 formats
      (#​1346).
    • Add support for float PCM samples in Sonic.
    • Add support for 16 bit PCM samples in ToFloatPcmAudioProcessor.
  • Video:
    • Disable codec reuse for Dolby-Vision content with different profiles.
    • Re-enable workaround for wrongly reported performance points for secure
      codecs (#​2856).
  • Text:
    • Fix parsing of CEA-6/708 subtitles in Dolby Vision content
      (#​2775).
  • Image:
    • Fix ScrubbingMode issue where player gets stuck while scrubbing a DASH
      thumbnail track
      (#​2815).
  • DRM:
    • Change the return type of MediaDrmCallback methods from byte[] to a
      new MediaDrmCallback.Response type, to allow returning extra optional
      information. This is a source breaking change, but breakages can be
      easily resolved by wrapping the previous byte[] return value with new Response before returning.
    • Add key request info like URL and latency to
      AnalyticsListener.onDrmKeysLoaded
      (#​1001).
    • Move provisioning request data from a URL parameter to the POST body.
  • Effect:
    • Add Presentation.copyWithUnsetSideRoundedTo to round the unset output
      side when Presentation is created with a single side length.
  • Muxers:
    • Add MediaMuxerCompat, a drop-in replacement for framework
      MediaMuxer.
    • Add MuxerUtil.createMotionPhotoFromJpegImageAndBmffVideo() to allow
      Motion Photo creation.
    • Add WebmMuxer to allow muxing of OPUS, VORBIS, VP8 and VP9
      media streams into a webm file format.
  • IMA extension:
    • Removal of custom proguard rules, so that apps can use those released in
      IMA android archive instead.
    • Add ImaServerSideAdInsertionUriBuilder.setNetworkCode, a new API for
      setting the Google Ad Manager network code for the IMA SDK to handle ads
      identifiers as specified in Google Ad Manager settings. Network codes
      are optional but recommended for Full service stream requests. To find
      the network code, see
      this article.
    • Bump IMA dependency to 3.37.0 which requires enabling core library
      desugaring. This must also be enabled by dependent apps too. See IMA's
      config notes.
    • Support IMA DAI custom UI options in SSAI URI builder. Custom UI options
      for server side ad insertion include “Skippable” and “About This Ad”
      rendering support. The feature is currently available for selected
      publishers behind an allow list. This change also upgrades the IMA SDK
      version to 3.38.0
      (release notes)
      to access the custom UI options API.
    • Fix issue where content preparation error for content after an ad would
      be wrongly reported as an ad playback error
      (#​2656).
  • Session:
    • Add new parameter to MediaSession.Callback.onPlaybackResumption to
      indicate if the call happens to gather information only or to start
      playback (#​1764).
    • Update MediaSession.ControllerInfo.isTrusted to also declare
      controllers from the own app as trusted
      (#​2542).
    • Add MediaSessionService.triggerNotificationUpdate to manually trigger
      a notification update
      (#​1833).
    • Add ProgressListener to custom command methods.
    • Change the default value for
      MediaLibrarySession.Builder.setLibraryErrorReplicationMode to non
      fatal.
    • Add a Context parameter to
      MediaButtonReceiver.onForegroundServiceStartNotAllowedException
      (#​2625).
    • Read the volume control ID from the platform PlaybackInfo instead of
      fetching it via binder. This ensures that playback type and volume
      control ID are read atomically and do match to each other.
    • Fix bug where ACTION_UP key events were filtered out before passing
      them to the callback for custom handling. This brings parity with what
      media1 did and the platform does
      (#​2637).
    • Fix bug where getCurrentTimeline() was called by PlayerWrapper even
      when the command isn't available
      (#​2665).
    • Fix bug where a message was left in the message queue of the main looper
      which caused a memory leak after the service terminated
      (#​2692).
    • When connected to a legacy session app with a MediaBrowser, custom
      commands are sent to the session only if the custom action is advertised
      as a custom action in PlaybackStateCompat of the legacy session. All
      other custom actions are sent to the service.
    • Implemented onAudioSessionIdChanged to notify media controllers when
      an audio session ID is set by the session
      (#​244).
    • Fix bug where KEYCODE_HEADSETHOOK did not start the player upon and
      media key event Intent arriving in onStartCommand(). This is fixed
      by handling 'KEYCODE_HEADSETHOOK' just like KEYCODE_MEDIA_PLAY_PAUSE
      (#​2816).
    • Fix a bug where Surface size was not communicated between the session
      and the controller, resulting in the failure to apply video effects in
      demo-session. If you are using a controller, this might be a breaking
      change if your player cannot handle a setVideoSurfaceHolder call.
    • Fix propagation of non-String CharSequence metadata values like
      span-styled strings
      (#​2853).
    • 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.
    • 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.
  • UI:
    • Add ProgressStateWithTickInterval class and the corresponding
      rememberProgressStateWithTickInterval Composable to
      media3-ui-compose module. This state holder is used in demo-compose
      to display the current position and duration in text form.
    • Add MuteButtonState to ui-compose that handles muting of the
      Player volume. This state holder is used in demo-compose to display
      mute/unmute toggle button.
    • Add ProgressStateWithTickCount classes and the corresponding
      rememberProgressStateWithTickCount Composable to media3-ui-compose
      module. This state holder is used in demo-compose to display progress
      as a horizontal read-only progress bar.
    • Add ContentFrame Composable to media3-ui-compose which combines
      PlayerSurface management with aspect ratio resizing and covering with
      a shutter.
    • Work around a known API 34 platform bug causing stretched/cropped videos
      when using SurfaceView inside a Compose AndroidView and hence
      affecting ContentFrame and PlayerSurface Composables with
      SURFACE_TYPE_SURFACE_VIEW
      (#​1237,
      #​2811).
    • Create a new media3-ui-compose-material3 module and add
      Material3-themed Composables (PlayPauseButton, NextButton,
      PreviousButton, SeekBackButton, SeekForwardButton, RepeatButton,
      ShuffleButton, MuteButton) to it.
    • 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.
    • Add support for placing a media route button in the PlayerView.
    • Use BidiFormatter to correctly display punctuation in RTL text
      subtitles (#​11214).
  • HLS extension:
    • Parse HLS interstitial skip attributes.
    • Map skip control attributes from the HLS playlist and the asset list
      document into the AdPlaybackState for public access.
    • Fix bug where the start time of the playlist was dropped when the
      EXT-X-PROGRAM-START-DATE tag defining the start time was removed from a
      playlist (#​2760).
    • Use binary search to find the segment index of a given position in the
      playlist (#​2826).
    • 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.
    • Properly handle fetching the next chunk for an HlsMediaPlaylist with
      no segments (#​2821).
    • Use the default start position for pre rolls with live streams.
  • DASH extension:
    • Fix UnsupportedOperationException when playing DASH streams with a
      non-hierarchical data: URI manifest
      (#​2688).
    • Reset LiveConfiguration to the value provided by the MediaItem of
      the DashMediaSource when released and when the media item is updated
      by the user (#​2606).
    • Avoid crashes caused by invalid manifest updates that were not reported
      as player errors
      (#​2805).
  • RTSP extension:
    • Handle error of missing RTP packets when processing fragmented NAL units
      for H264 and H265
      (#​2613).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • AV1 Extension: The AV1 software decoder now uses the high-performance
      dav1d library, replacing the previous libgav1 implementation for
      improved decoding speed.
    • 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).
  • Cast extension:
    • Add CastPlayer.Builder, which enables CastPlayer to do both local
      and Cast playback. To keep the old CastPlayer behavior of supporting
      only Cast playback, you can use RemoteCastPlayer. The pre-existing
      CastPlayer constructors keep their old behavior, but are deprecated in
      favour of using the CastPlayer or RemoteCastPlayer builders instead.
    • Stop enforcing a non-null mime type in DefaultMediaItemConverter.
    • Use MediaItem.mediaMetadata.mediaType to infer the Cast MEDIA_TYPE to
      use in DefaultCastOptionsProvider#toMediaQueueItem, when available.
    • Enable remote to local transfers in DefaultCastOptionsProvider.
    • Add support for Cast in the Session demo.
    • Add support for displaying a media route button on a Composable UI.
    • Add support for displaying a media route button on an action bar menu.
    • Add support for displaying a media route button as a View UI.
    • Change the Cast media channel message type used to populate the Cast
      receiver's media queue from "QUEUE_LOAD" to "LOAD"
      (CAF docs).
      This may affect receiver applications' relying on a specific message
      format to load the media queue
      (#​3080).
  • Test Utilities:
    • Add maximum time diff for the auto-advancing behavior of FakeClock. It
      defaults to 1 second, but is configurable via FakeClock.Builder.
    • Add maximum time diff between messages for
      RobolectricUtil.runMainLooperUntil (and runLooperUntil). It defaults
      to 1 second, but is configurable via new overloads of these methods.
    • Move CapturingRenderersFactory from test-utils to
      test-utils-robolectric.
  • Remove deprecated symbols:
    • Remove deprecated DefaultPreloadManager constructor. Use
      DefaultPreloadManager.Builder instead.
    • Removed deprecated EditedMediaItemSequence constructors. Use
      EditedMediaItemSequence.Builder instead.
    • Remove BitmapFactoryImageDecoder.BitmapDecoder. Use
      ExternallyLoadedImageDecoder instead.
    • Remove deprecated ShadowMediaCodecConfig.forAllSupportedMimeTypes().
      Use ShadowMediaCodecConfig.withAllDefaultSupportedCodecs() instead.
    • Remove deprecated
      ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes(). Use
      ShadowMediaCodecConfig.withNoDefaultSupportedCodecs() instead.

v1.8.1

Compare Source

  • Effect:
    • Explicitly set GL_DRAW_BUFFER and GL_READ_BUFFER when transitioning from surfaceless context.

v1.8.0

Compare Source

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 migrated it to an instance-based,
      AutoCloseable API. Use the new Builder to create an instance for a
      MediaItem, then call retrieveTrackGroups(), retrieveTimeline(),
      and retrieveDurationUs() to get ListenableFutures for the metadata.
      The previous static methods are now deprecated
      (#​2462).
  • Image:
    • Limit decoded bitmaps to the display size in
      BitmapFactoryImageDecoder, to avoid an app crashing with Canvas: trying to draw too large bitmap. from PlayerView when trying to
      display very large (e.g. 50MP) images.
    • Change the signature of
      DefaultRenderersFactory.getImageDecoderFactory() to take a Context
      parameter.
    • Align the max bitmap output size used in CompositionPlayer with that
      already used in Transformer (meaning CompositionPlayer does not
      consider the display size when decoding bitmaps, unlike ExoPlayer).
  • DRM:
    • Add new overload of OfflineLicenseHelper.newWidevineInstance accepting
      a MediaItem.DrmConfiguration so that HTTP request headers can be
      applied correctly
      (#​2169).
  • Effect:
    • Add Presentation.createForShortSide(int) that creates a Presentation
      that ensures the shortest side always matches the given value,
      regardless of input orientation.
  • Muxers:
    • Fix a bug where correct sample flags were not set for audio samples in
      fragmented MP4.
    • writeSampleData() API now uses muxer specific BufferInfo class
      instead of MediaCodec.BufferInfo.
    • Add Muxer.Factory#supportsWritingNegativeTimestampsInEditList which
      defaults to false.
  • IMA extension:
    • Fix a bug where a load error in one ad may accidentally invalidate
      another ad group.
    • Fix bug where ad groups after the end of a VOD window stalled playback.
      Ads groups with a start time after the window are not enqueued into the
      MediaPeriodQueue anymore
      (#​2215).
  • 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.
    • 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).
    • Fix bug where calling setSessionExtras from the main thread when
      running the player from a different application thread then the main
      thread caused an IllegalStateException
      (#​2265).
    • Don't automatically show a notification if a player is set up with media
      items without preparing or playing them
      (#​2423#​2423). This behavior
      is configurable via
      MediaSessionService.setShowNotificationForIdlePlayer.
    • Add custom PlaybackException for all or selected controllers.
    • Fix bug where seeking in a live stream on a MediaController can cause
      an IllegalArgumentException.
    • For live streams, stop publishing a playback position and the ability to
      seek in the current item for platform media controllers, to avoid
      position artefacts in the Android Auto UI (and other controllers using
      this information from the platform media session)
      (#​1758).
    • Fix a bug where passing null into getLibraryRoot of a MediaBrowser
      connected to a legacy MediaBrowserServiceCompat produced a
      NullPointerException.
    • Fix a bug where sending custom actions, a search result or a getItem
      request crashed the legacy session app with a ClassNotFoundException.
    • Fix a bug where MediaItem.LocalConfiguration.uri was shared to the
      platform sessions's MediaMetadata. To intentionally share a URI to
      allow controllers to re-request the media, set
      MediaItem.RequestMetadata.mediaUri instead.
  • UI:
    • Fix bug where PlayerSurface inside re-usable components like
      LazyColumn didn't work correctly
      (#​2493).
    • Fix a Compose bug which resulted in a gap between setting the initial
      button states and observing the change in state (e.g. icon shapes or
      being enabled). Any changes made to the Player outside of the
      observation period are now picked up
      (#​2313).
    • Add state holders and composables to the media3-ui-compose module for
      SeekBackButtonState and SeekForwardButtonState.
    • Add support for ExoPlayer's scrubbing mode to PlayerControlView. When
      enabled, this puts the player into scrubbing mode when the user starts
      dragging the scrubber bar, issues a player.seekTo call for every
      movement, and then exits scrubbing mode when the touch is lifted from
      the screen. This integration can be enabled with either
      time_bar_scrubbing_enabled = true in XML or the
      setTimeBarScrubbingEnabled(boolean) method from Java/Kotlin.
    • Make PlayerSurface accept a nullable Player argument.
  • Downloads:
    • Add partial download support for progressive streams. Apps can prepare a
      progressive stream with DownloadHelper, and request a
      DownloadRequest from the helper with specifying the time-based media
      start and end positions that the download should cover. The returned
      DownloadRequest carries the resolved byte range, with which a
      ProgressiveDownloader can be created and download the content
      correspondingly.
    • Add DownloadHelper.Factory with which the static
      DownloadHelper.forMediaItem() methods are replaced.
    • Add Factory for SegmentDownloader implementations.
    • Add partial download support for adaptive streams. Apps can prepare an
      adaptive stream with DownloadHelper, and request a DownloadRequest
      from the helper with specifying the time-based media start and end
      positions that the download should cover. The returned DownloadRequest
      carries the resolved time range, with which a concrete
      SegmentDownloader can be created and download the content
      correspondingly.
  • Cronet extension:
    • Add automatic cookie handling
      (#​5975).
  • HLS extension:
    • Fix bug where HlsSampleStreamWrapper attempts to seek inside buffer
      when there are no chunks available in the buffer
      #​2598.
    • 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).
    • Fix playlist parsing to accept \f (form feed) in quoted string
      attribute values
      (#​2420).
    • Support updating interstitials with the same ID
      (#​2427).
    • Fix bug where playlist load errors are sometimes not propagated once a
      live stream runs out of segments to load
      (#​2401#​2401).
    • Group subtitle renditions by NAME tag, similar to how audio renditions
      are grouped already
      (#​1666).
    • Support X-ASSET-LIST and live streams with HlsInterstitialsAdsLoader.
  • DASH extension:
    • Fix issue where trick-play adaptation set is merged with its main
      adaptation set to form an invalid TrackGroup
      (#​2148).
    • Fix bug where shortening a DASH period duration can throw an exception
      when samples beyond the new duration have already been read by the
      rendering pipeline
      (#​2440).
    • Fix bug where redirect wasn't followed when using CMCD query parameters
      (#​2475).
  • RTSP extension:
    • Add support for RTP Aggregation Packet for H265 in accordance with RFC
      7798#4.4.2 (#​2413).
    • Fix RtspClient to use the location uri as provided when processing an
      HTTP 302 response
      (#​2398).
    • Add parsing support for SessionDescriptions containing lines with
      trailing whitespace characters
      (#​2357).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Fix bug where
      DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChange
      has no effect for audio decoder extensions
      (#​2258).
  • Cast extension:
    • Add support for setVolume(), and getVolume()
      (#​2279).
    • Prevent CastPlayer from entering STATE_BUFFERING while the timeline is
      empty.
    • Add support for getDeviceVolume(), setDeviceVolume(),
      getDeviceMuted(), and setDeviceMuted()
      (#​2089).
  • Test Utilities:
    • Add advance(player).untilPositionAtLeast and untilMediaItemIndex to
      TestPlayerRunHelper in order to advance the player until a specified
      position is reached. In most cases, these methods are more reliable than
      the existing untilPosition and untilStartOfMediaItem methods.
    • Move FakeDownloader to test-utils-robolectric module for reuse in
      other tests.
    • Removed transformer.TestUtil.addAudioDecoders(String...),
      transformer.TestUtil.addAudioEncoders(String...), and
      transformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig, String...). Use ShadowMediaCodecConfig to configure shadow encoders
      and decoders instead.
    • Replaced the "exotest" prefix with "media3" in codec names reported by
      ShadowMediaCodecConfig.
  • Remove deprecated symbols:
    • Removed deprecated SegmentDownloader constructor
      SegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory, Executor) and the corresponding constructors in its subclasses
      DashDownloader, HlsDownloader and SsDownloader.
    • Removed deprecated Player.hasNext(), Player.hasNextWindow(). Use
      Player.hasNextMediaItem() instead.
    • Removed deprecated Player.next(). Use Player.seekToNextMediaItem()
      instead.
    • Removed deprecated Player.seekToPreviousWindow(). Use
      Player.seekToPreviousMediaItem() instead.
    • Removed deprecated Player.seekToNextWindow(). Use
      Player.seekToNextMediaItem() instead.
    • Removed deprecated BaseAudioProcessor in exoplayer module. Use
      BaseAudioProcessor under common module.
    • Remove deprecated MediaCodecVideoRenderer constructor
      MediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor, MediaCodecSelector, long, boolean, @&#8203;Nullable Handler, @&#8203;Nullable VideoRendererEventListener, int, float, @&#8203;Nullable VideoSinkProvider).

v1.7.1

This release has the same code as 1.6.1 and is being released to ensure it
appears as a 'newer' release than 1.7.0, which was an alpha release accidentally
tagged as stable (see below).

v1.7.0

This release should have been 1.7.0-alpha01, but was accidentally tagged
1.7.0 (i.e. stable) on maven.google.com. Please do not use it. Stay on
1.6.1 or upgrade to 1.7.1 (which has the same code as 1.6.1).

v1.6.1

Compare Source

This release includes the following changes since the
1.6.0 release:

  • Common Library:
    • Add PlaybackParameters.withPitch(float) method for easily copying a
      PlaybackParameters with a new pitch value
      (#​2257).
  • ExoPlayer:
    • Fix issue where media item transition fails due to recoverable renderer
      error during initialization of the next media item
      (#​2229).
    • Fix issue where ProgressiveMediaPeriod throws an
      IllegalStateException as PreloadMediaSource attempts to call its
      getBufferedDurationUs() before it is prepared
      (#​2315).
    • Fix sending CmcdData in manifest requests for DASH, HLS, and
      SmoothStreaming (#​2253).
    • Ensure AdPlaybackState.withAdDurationsUs(long[][]) can be used after
      ad groups have been removed. The user still needs to pass in an array of
      durations for removed ad groups which can be empty or null
      (#​2267).
  • Extractors:
    • MP4: Parse alternate_group from the tkhd box and expose it as an
      Mp4AlternateGroupData entry in each track's Format.metadata
      (#​2242).
  • Audio:
    • Fix offload issue where the position might get stuck when playing a
      playlist of short content
      (#​1920).
  • Session:
    • Lower aggregation timeout for platform MediaSession callbacks from 500
      to 100 milliseconds and add an experimental setter to allow apps to
      configure this value.
    • Fix issue where notifications reappear after they have been dismissed by
      the user (#​2302).
    • Fix a bug where the session returned a single-item timeline when the
      wrapped player is actually empty. This happened when the wrapped player
      doesn't have COMMAND_GET_TIMELINE available while
      COMMAND_GET_CURRENT_MEDIA_ITEM is available and the wrapped player is
      empty (#​2320).
    • Fix a bug where calling
      MediaSessionService.setMediaNotificationProvider is silently ignored
      after other interactions with the service like
      setForegroundServiceTimeoutMs
      (#​2305).
  • UI:
    • Enable PlayerSurface to work with ExoPlayer.setVideoEffects and
      CompositionPlayer.
    • Fix bug where PlayerSurface can't be recomposed with a new Player.
  • HLS extension:
    • Fix issue where chunk duration wasn't set in CmcdData for HLS media,
      causing an assertion failure when processing encrypted media segments
      (#​2312).
  • RTSP extension:
    • Add support for URI with RTSPT scheme as a way to configure the RTSP
      session to use TCP
      (#​1484).
  • Cast extension:
    • Add support for playlist metadata
      (#​2235).

v1.6.0

Compare Source

This release includes the following changes since the
1.5.1 release:

  • Common Library:
    • Add AudioManagerCompat and AudioFocusRequestCompat to replace the
      equivalent classes in androidx.media.
    • Upgrade Kotlin from 1.9.20 to 2.0.20 and use Compose Compiler Gradle
      plugin. Upgrade KotlinX Coroutines library from 1.8.1 to 1.9.0.
    • Remove Format.toBundle(boolean excludeMetadata) method, use
      Format.toBundle() instead.
    • Fix bug in SimpleBasePlayer where setting a new
      currentMediaItemIndex in State after setPlaylist with null
      MediaMetadata does not reevaluate the metadata
      (#​1940).
    • Change SimpleBasePlayer.State access from protected to public to make
      it easier to handle updates in other classes
      (#​2128).
  • ExoPlayer:
    • Add MediaExtractorCompat, a new class that provides equivalent
      features to platform MediaExtractor.
    • Add experimental 'ExoPlayer' pre-warming support for playback using
      MediaCodecVideoRenderer. You can configure DefaultRenderersFactory
      through experimentalSetEnableMediaCodecVideoRendererPrewarming to
      provide a secondary MediaCodecVideoRenderer to ExoPlayer. If
      enabled, ExoPlayer pre-processes the video of consecutive media items
      during playback to reduce media item transition latency.
    • Reduce default values for bufferForPlaybackMs and
      bufferForPlaybackAfterRebufferMs in DefaultLoadControl to 1000 and
      2000 ms respectively.
    • Initialize DeviceInfo and device volume asynchronously (if enabled
      using setDeviceVolumeControlEnabled). These values aren't available
      instantly after ExoPlayer.Builder.build(), and Player.Listener
      notifies changes through onDeviceInfoChanged and
      onDeviceVolumeChanged.
    • Initial audio session id is no longer immediately available after
      creating the player. You can use
      AnalyticsListener.onAudioSessionIdChanged to listen to the initial
      update if required.
    • Consider language when selecting a video track. By default, select a
      'main' video track that matches the language of the selected audio
      track, if available. Explicit video language preferences can be
      expressed with
      TrackSelectionParameters.Builder.setPreferredVideoLanguage(s).
    • Add selectedAudioLanguage parameter to
      DefaultTrackSelector.selectVideoTrack() method.
    • Add retryCount parameter to MediaSourceEventListener.onLoadStarted
      and corresponding MediaSourceEventListener.EventDispatcher methods.
    • Fix bug where playlist items or periods in multi-period DASH streams
      with durations that don't match the actual content could cause frame
      freezes at the end of the item
      (#​1698).
    • Move BasePreloadManager.Listener to a top-level
      PreloadManagerListener.
    • RenderersFactory.createSecondaryRenderer can be implemented to provide
      secondary renderers for pre-warming. Pre-warming enables quicker media
      item transitions during playback.
    • Enable sending CmcdData for manifest requests in adaptive streaming
      formats DASH, HLS, and SmoothStreaming
      (#​1951).
    • Provide MediaCodecInfo of the codec that will be initialized in
      MediaCodecRenderer.onReadyToInitializeCodec
      (#​1963).
    • Change AdsMediaSource to allow the AdPlaybackStates to grow by
      appending ad groups. Invalid modifications are detected and throw an
      exception.
    • Fix issue where additional decode-only frames may be displayed in quick
      succession when transitioning to content media after a mid-roll ad.
    • Make DefaultRenderersFactory add two MetadataRenderer instances to
      enable apps to receive two different schemes of metadata by default.
    • Reevaluate whether the ongoing load of a chunk should be cancelled when
      playback is paused
      (#​1785).
    • Add option to ClippingMediaSource to allow clipping in unseekable
      media.
    • Fix bug where seeking with pre-warming could block following media item
      transition.
    • Fix a bug where ExoPlayer.isLoading() remains true while it has
      transitioned to STATE_IDLE or STATE_ENDED
      (#​2133).
    • Add lastRebufferRealtimeMs to LoadControl.Parameter
      (#​2113).
  • Transformer:
    • Add support for transmuxing into alternative backward compatible
      formats.
    • Add support for transcoding and transmuxing Dolby Vision (profile 8)
      format.
    • Update parameters of VideoFrameProcessor.registerInputStream and
      VideoFrameProcessor.Listener.onInputStreamRegistered to use Format.
    • Generate HDR static metadata when using DefaultEncoderFactory.
    • Enable support for Android platform diagnostics using
      MediaMetricsManager. Transformer forwards editing events and
      performance data to the platform, which helps to provide system
      performance and debugging information on the device. This data may also
      be collected by Google
      if sharing usage and diagnostics data is enabled
      by the user of the device. Apps can opt-out of contributing to platform
      diagnostics for Transformer with
      Transformer.Builder.setUsePlatformDiagnostics(false).
    • Split InAppMuxer into InAppMp4Muxer and InAppFragmentedMp4Muxer.
      You use InAppMp4Muxer to produce a non-fragmented MP4 file, while
      InAppFragmentedMp4Muxer is for producing a fragmented MP4 file.
    • Move Muxer interface from media3-muxer to media3-transformer.
    • Add MediaProjectionAssetLoader, which provides media from a
      MediaProjection for screen recording, and add support for screen
      recording to the Transformer demo app.
    • Add #getInputFormat() to Codec interface.
    • Shift the responsibility to release the GlObjectsProvider onto the
      caller in DefaultVideoFrameProcessor and DefaultVideoCompositor when
      possible.
  • Extractors:
    • AVI: Fix handling of files with constant bitrate compressed audio where
      the stream header stores the number of bytes instead of the number of
      chunks.
    • Fix handling of NAL units with lengths expressed in 1 or 2 bytes (rather
      than 4).
    • Fix ArrayIndexOutOfBoundsException in MP4 edit lists when the edit
      list starts at a non-sync frame with no preceding sync frame
      (#​2062).
    • Fix issue where TS streams can get stuck on some devices
      (#​2069).
    • FLAC: Add support for 32-bit FLAC files. Previously these would fail to
      play with IllegalStateException: Playback stuck buffering and not loading (#​2197).
  • Audio:
    • Fix onAudioPositionAdvancing to be called when playback resumes
      (previously it was called when playback was paused).
    • Don't bypass SonicAudioProcessor when SpeedChangingAudioProcessor is
      configured with default parameters.
    • Fix underflow in Sonic#getOutputSize() that could cause
      DefaultAudioSink to stall.
    • Fix MediaCodecAudioRenderer.getDurationToProgressUs() and
      DecoderAudioRenderer.getDurationToProgressUs() so that seeks correctly
      reset the provided durations.
    • Make androidx.media3.common.audio.SonicAudioProcessor final.
    • Add support for float PCM to ChannelMappingAudioProcessor and
      TrimmingAudioProcessor.
  • Video:
    • Change MediaCodecVideoRenderer.shouldUsePlaceholderSurface to
      protected so that applications can override to block usage of
      placeholder surfaces
      (#​1905).
    • Add experimental ExoPlayer AV1 sample dependency parsing to speed up
      seeking. Enable it with the new
      DefaultRenderersFactory.experimentalSetParseAv1SampleDependencies API.
    • Add experimental ExoPlayer API to drop late MediaCodecVideoRenderer
      decoder input buffers that are not depended on. Enable it with
      DefaultRenderersFactory.experimentalSetLateThresholdToDropDecoderInputUs.
    • Fix issue where a player without a surface was ready immediately and
      very slow decoding any pending frames
      (#​1973).
    • Exclude Xiaomi and OPPO devices from detached surface mode to avoid
      screen flickering
      (#​2059).
  • Text:
    • Add support for VobSub subtitles
      (#​8260).
    • Stop eagerly loading all subtitle files configured with
      MediaItem.Builder.setSubtitleConfigurations, and instead only load one
      if it is selected by track selection
      (#​1721).
    • TTML: Add support for referencing tts:origin and tts:extent using
      style (#​2953).
    • Restrict WebVTT and SubRip timestamps to exactly 3 decimal places.
      Previously we incorrectly parsed any number of decimal places but always
      assumed the value was in milliseconds, leading to incorrect timestamps
      (#​1997).
    • Fix playback hanging when a playlist contains clipped items with CEA-608
      or CEA-708 captions.
    • Fix IllegalStateException when an SSA file contains a cue with zero
      duration (start and end time equal)
      (#​2052).
    • Suppress (and log) subtitle parsing errors when subtitles are muxed into
      the same container as audio and video
      (#​2052).
    • Fix handling of multi-byte UTF-8 characters in WebVTT files using CR
      line endings (#​2167).
  • DRM:
    • Fix MediaCodec$CryptoException: Operation not supported in this configuration error when playing ClearKey content on API below 27
      (#​1732).
  • Effect:
    • Moved the functionality of OverlaySettings into
      StaticOverlaySettings. OverlaySettings can be subclassed to allow
      dynamic overlay settings.
  • Muxers:
    • Moved MuxerException out of Muxer interface to avoid a very long
      fully qualified name.
    • Renamed setSampleCopyEnabled() method to setSampleCopyingEnabled()
      in both Mp4Muxer.Builder and FragmentedMp4Muxer.Builder.
    • Mp4Muxer.addTrack() and FragmentedMp4Muxer.addTrack() now return an
      int track ID instead of a TrackToken.
    • Mp4Muxer and FragmentedMp4Muxer no longer implement Muxer
      interface.
    • Disable Mp4Muxer sample batching and copying by default.
    • Fix a bug in FragmentedMp4Muxer that creates a lot of fragments when
      only audio track is written.
  • Session:
    • Keep foreground service state for an additional 10 minutes when playback
      pauses, stops or fails. This allows users to resume playback within this
      timeout without risking foreground service restrictions on various
      devices. Note that simply calling player.pause() can no longer be used
      to stop the foreground service before stopSelf() when overriding
      onTaskRemoved, use MediaSessionService.pauseAllPlayersAndStopSelf()
      instead.
    • Keep notification visible when playback enters an error or stopped
      state. The notification is only removed if the playlist is cleared or
      the player is released.
    • Improve handling of Android platform MediaSession actions ACTION_PLAY
      and ACTION_PAUSE to only set one of them according to the available
      commands and also accept if only one of them is set.
    • Add Context as a parameter to
      MediaButtonReceiver.shouldStartForegroundService
      (#​1887).
    • Fix bug where calling a Player method on a MediaController connected
      to a legacy session dropped changes from a pending update.
    • Make MediaSession.setSessionActivity(PendingIntent) accept null
      (#​2109).
    • Fix bug where a stale notification stays visible when the playlist is
      cleared (#​2211).
  • UI:
    • Add state holders and composables to the media3-ui-compose module for
      PlayerSurface, PresentationState, PlayPauseButtonState,
      NextButtonState, PreviousButtonState, RepeatButtonState,
      ShuffleButtonState and PlaybackSpeedState.
  • Downloads:
    • Fix bug in CacheWriter that leaves data sources open and cache areas
      locked in case the data source throws an Exception other than
      IOException
      (#​9760).
  • HLS extension:
    • Add a first version of HlsInterstitialsAdsLoader. The ads loader reads
      the HLS interstitials of an HLS media playlist and maps them to the
      AdPlaybackState that is passed to the AdsMediaSource. This initial
      version only supports HLS VOD streams with X-ASSET-URI attributes.
    • Add HlsInterstitialsAdsLoader.AdsMediaSourceFactory. Apps can use it
      to create AdsMediaSource instances that use an
      HlsInterstitialsAdsLoader in a convenient and safe way.
    • Parse SUPPLEMENTAL-CODECS tag from HLS playlist to detect Dolby Vision
      formats (#​1785).
    • Loosen the condition for seeking to sync positions in an HLS stream
      (#​2209).
  • DASH extension:
    • Add AC-4 Level-4 format support for DASH
      (#​1898).
    • Fix issue when calculating the update interval for ad insertion in
      multi-period live streams
      (#​1698).
    • Parse scte214:supplementalCodecs attribute from DASH manifest to
      detect Dolby Vision formats
      (#​1785).
    • Improve handling of period transitions in live streams where the period
      contains media samples beyond the declared period duration
      (#​1698).
    • Fix issue where adaptation sets marked with adaptation-set-switching
      but different languages or role flags are merged together
      (#​2222).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Add the MPEG-H decoder module which uses the native MPEG-H decoder
      module to decode MPEG-H audio
      (#​1826).
  • MIDI extension:
    • Plumb custom AudioSink and AudioRendererEventListener instances into
      MidiRenderer.
  • Cast extension:
    • Bump the play-services-cast-framework dependency to 21.5.0 to fix a
      FLAG_MUTABLE crash in apps targeting API 34+ on devices with Google
      Play services installed but disabled
      (#​2178).
  • Demo app:
    • Extend demo-compose with additional buttons and enhance
      PlayerSurface integration with scaling and shutter support.
  • Remove deprecated symbols:
    • Remove deprecated AudioMixer.create() method. Use
      DefaultAudioMixer.Factory().create() instead.
    • Remove the following deprecated Transformer.Builder methods:
      • setTransformationRequest(), use setAudioMimeType(),
        setVideoMimeType(), and setHdrMode() instead.
      • setAudioProcessors(), set the audio processor in an
        EditedMediaItem.Builder.setEffects(), and pass it to
        Transformer.start() instead.
      • setVideoEffects(), set video effect in an
        EditedMediaItem.Builder.setEffects(), and pass it to
        Transformer.start() instead.
      • setRemoveAudio(), use EditedMediaItem.Builder.setRemoveAudio()
        to remove the audio from the EditedMediaItem passed to
        Transformer.start() instead.
      • setRemoveVideo(), use EditedMediaItem.Builder.setRemoveVideo()
        to remove the video from the EditedMediaItem passed to
        Transformer.start() instead.
      • setFlattenForSlowMotion(), use
        EditedMediaItem.Builder.setFlattenForSlowMotion() to flatten the
        EditedMediaItem passed to Transformer.start() instead.
      • setListener(), use addListener(), removeListener() or
        removeAllListeners() instead.
    • Remove the following deprecated Transformer.Listener methods:
      • onTransformationCompleted(MediaItem), use
        onCompleted(Composition, ExportResult) instead.
      • onTransformationCompleted(MediaItem, TransformationResult), use
        onCompleted(Composition, ExportResult) instead.
      • onTransformationError(MediaItem, Exception), use
        onError(Composition, ExportResult, ExportException) instead.
      • onTransformationError(MediaItem, TransformationException), use
        onError(Composition, ExportResult, ExportException) instead.
      • onTransformationError(MediaItem, TransformationResult, TransformationException), use onError(Composition, ExportResult, ExportException) instead.
      • onFallbackApplied(MediaItem, TransformationRequest, TransformationRequest), use onFallbackApplied(Composition, TransformationRequest, TransformationRequest) instead.
    • Remove deprecated TransformationResult class. Use ExportResult
      instead.
    • Remove deprecated TransformationException class. Use ExportException
      instead.
    • Remove deprecated Transformer.PROGRESS_STATE_NO_TRANSFORMATION. Use
      Transformer.PROGRESS_STATE_NOT_STARTED instead.
    • Remove deprecated Transformer.setListener(). Use
      Transformer.addListener(), Transformer.removeListener() or
      Transformer.removeAllListeners() instead.
    • Remove deprecated Transformer.startTransformation(). Use
      Transformer.start(MediaItem, String) instead.
    • Remove deprecated SingleFrameGlShaderProgram. Use
      BaseGlShaderProgram instead.
    • Remove Transformer.flattenForSlowMotion. Use
      EditedMediaItem.flattenForSlowMotion instead.
    • Removed ExoPlayer.VideoComponent, ExoPlayer.AudioComponent,
      ExoPlayer.TextComponent and ExoPlayer.DeviceComponent.
    • Removed androidx.media3.exoplayer.audio.SonicAudioProcessor.
    • Removed the following deprecated DownloadHelper methods:
      • Constructor DownloadHelper(MediaItem, @&#8203;Nullable MediaSource, TrackSelectionParameters, RendererCapabilities[]), use
        DownloadHelper(MediaItem, @&#8203;Nullable MediaSource, TrackSelectionParameters, RendererCapabilitiesList) instead.
      • getRendererCapabilities(RenderersFactory), equivalent
        functionality can be achieved by creating a
        DefaultRendererCapabilitiesList with a RenderersFactory, and
        calling DefaultRendererCapabilitiesList.getRendererCapabilities().
    • Removed
      PlayerNotificationManager.setMediaSessionToken(MediaSessionCompat)
      method. Use
      PlayerNotificationManager.setMediaSessionToken(MediaSession.Token) and
      pass in (MediaSession.Token) compatToken.getToken() instead.

v1.5.1

Compare Source

This release includes the following changes since the
1.5.0 release:

  • ExoPlayer:
    • Disable use of asynchronous decryption in MediaCodec to avoid reported
      codec timeout issues with this platform API
      (#​1641).
  • Extractors:
    • MP3: Don't stop playback early when a VBRI frame's table of contents
      doesn't cover all the MP3 data in a file
      (#​1904).
  • Video:
    • Rollback of using MediaCodecAdapter supplied pixel aspect ratio values
      when provided while processing onOutputFormatChanged
      (#​1371).
  • Text:
    • Fix bug in ReplacingCuesResolver.discardCuesBeforeTimeUs where the cue
      active at timeUs (started before but not yet ended) was incorrectly
      discarded (#​1939).
  • Metadata:
    • Extract disc/track numbering and genre from Vorbis comments into
      MediaMetadata
      (#​1958).

v1.5.0

Compare Source

This release includes the following changes since the
1.4.1 release:

  • Common Library:
    • Add ForwardingSimpleBasePlayer that allows forwarding to another
      player with small adjustments while ensuring full consistency and
      listener handling
      (#​1183).
    • Replace SimpleBasePlayer.State.playlist by getPlaylist() method.
    • Add override for SimpleBasePlayer.State.Builder.setPlaylist() to
      directly specify a Timeline and current Tracks and Metadata
      instead of building a playlist structure.
    • Increase minSdk to 21 (Android Lollipop). This is aligned with all
      other AndroidX libraries.
    • Add androidx.media3:media3-common-ktx artifact which provides
      Kotlin-specific functionality built on top of the Common library
    • Add Player.listen suspending extension function to spin a coroutine to
      listen to Player.Events to the media3-common-ktx library.
    • Remove @DoNotInline annotations from manually out-of-lined inner
      classes designed to avoid
      runtime class verification failures.
      Recent versions of R8
      now automatically out-of-line calls like these to avoid the runtime
      failures (so the manual out-of-lining is no longer required). All Gradle
      users of the library must already be a using a version of the Android
      Gradle Plugin that uses a version of R8 which does this,
      due to compileSdk = 35.
      Users of the library with non-Gradle build systems will need to ensure
      their R8-equivalent shrinking/obfuscating step does a similar automatic
      out-of-lining process in order to avoid runtime class verification
      failures. This change has
      already been done in other AndroidX libraries.
  • ExoPlayer:
    • MediaCodecRenderer.onProcessedStreamChange() can now be called for
      every media item. Previously it was not called for the first one. Use
      MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()
      to enable this.
    • Add PreloadMediaSource.PreloadControl.onPreloadError to allow
      PreloadMediaSource.PreloadControl implementations to take actions when
      error occurs.
    • Add BasePreloadManager.Listener to propagate preload events to apps.
    • Allow changing SNTP client timeout and retry alternative addresses on
      timeout (#​1540).
    • Remove MediaCodecAdapter.Configuration.flags as the field was always
      zero.
    • Allow the user to select the built-in speaker for playback on Wear OS
      API 35+ (where the device advertises support for this).
    • Defer the blocking call to
      Context.getSystemService(Context.AUDIO_SERVICE) until audio focus
      handling is enabled. This ensures the blocking call isn't done if audio
      focus handling is not enabled
      (#​1616).
    • Allow playback regardless of buffered duration when loading fails
      (#​1571).
    • Add AnalyticsListener.onRendererReadyChanged() to signal when
      individual renderers allow playback to be ready.
    • Fix MediaCodec.CryptoException sometimes being reported as an
      "unexpected runtime error" when MediaCodec is operated in asynchronous
      mode (default behaviour on API 31+).
    • Pass bufferedDurationUs instead of bufferedPositionUs with
      PreloadMediaSource.PreloadControl.onContinueLoadingRequested(). Also
      changes DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS to
      DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS, apps then
      need to pass a value representing a specific duration from the default
      start position for which the corresponding media source has to be
      preloaded with this IntDef, instead of a position.
    • Add ForwardingRenderer implementation that forwards all method calls
      to another renderer
      (1703).
    • Add playlist preloading for the next item in the playlist. Apps can
      enable preloading by calling
      ExoPlayer.setPreloadConfiguration(PreloadConfiguration) accordingly.
      By default preloading is disabled. When opted-in and to not interfere
      with playback, DefaultLoadControl restricts preloading to start and
      continue only when the player is not loading for playback. Apps can
      change this behaviour by implementing
      LoadControl.shouldContinuePreloading() accordingly (like when
      overriding this method in DefaultLoadControl). The default
      implementation of LoadControl disables preloading in case an app is
      using a custom implementation of LoadControl.
    • Add method MediaSourceEventListener.EventDispatcher.dispatchEvent() to
      allow invoking events of subclass listeners
      (1736).
    • Add DefaultPreloadManager.Builder that builds the
      DefaultPreloadManager and ExoPlayer instances with consistently
      shared configurations.
    • Remove Renderer[] parameter from LoadControl.onTracksSelected() as
      DefaultLoadControl implementation can retrieve the stream types from
      ExoTrackSelection[].
    • Deprecated DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[]) and marked method as final to prevent overrides.
      The new
      DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])
      should be used instead.
    • Report MediaSourceEventListener events from secondary sources in
      MergingMediaSource. This will result in load
      start/error/cancelled/completed events being reported for sideloaded
      subtitles (those added with
      MediaItem.LocalConfiguration.subtitleConfigurations), which may appear
      as duplicate load events emitted from AnalyticsListener.
    • Prevent subtitle & metadata errors from completely stopping playback.
      Instead the problematic track is disabled and playback of the remaining
      tracks continues
      (#​1722).
      • In new subtitle handling (during extraction), associated parse (e.g.
        invalid subtitle data) and load errors (e.g. HTTP 404) are emitted
        via onLoadError callbacks.
      • In legacy subtitle handling (during rendering), only associated load
        errors are emitted via onLoadError callbacks while parse errors
        are silently ignored (this is pre-existing behaviour).
    • Fix bug where playlist items or periods in multi-period DASH streams
      with durations that don't match the actual content could cause frame
      freezes at the end of the item
      (#​1698).
    • Add a setter to SntpClient to set the max elapsed time since the last
      update after which the client is re-initialized
      (#​1794).
  • Transformer:
    • Add SurfaceAssetLoader, which supports queueing video data to
      Transformer via a Surface.
    • ImageAssetLoader reports unsupported input via AssetLoader.onError
      instead of throwing an IllegalStateException.
    • Make setting the image duration using
      MediaItem.Builder.setImageDurationMs mandatory for image export.
    • Add export support for gaps in sequences of audio EditedMediaItems.
  • Track Selection:
    • DefaultTrackSelector: Prefer object-based audio over channel-based
      audio when other factors are equal.
  • Extractors:
    • Allow Mp4Extractor and FragmentedMp4Extractor to identify H264
      samples that are not used as reference by subsequent samples.
    • Add option to enable index-based seeking in AmrExtractor.
    • Treat MP3 files with more than 128kB between valid frames as truncated
      (instead of invalid). This means files with non-MP3 data at the end,
      with no other metadata to indicate the length of the MP3 bytes, now stop
      playback at the end of the MP3 data instead of failing with
      ParserException: Searched too many bytes.{contentIsMalformed=true, dataType=1} (#​1563).
    • Fix preroll sample handling for non-keyframe media start positions when
      processing edit lists in MP4 files
      (#​1659).
    • Improved frame rate calculation by using media duration from the mdhd
      box in Mp4Extractor and FragmentedMp4Extractor
      (#​1531).
    • Fix incorrect scaling of media_time in MP4 edit lists. While
      segment_duration was already correctly scaled using the movie
      timescale, media_time is now properly scaled using the track
      timescale, as specified by the MP4 format standard
      (#​1792).
    • Handle out-of-order frames in endIndices calculation for MP4 with edit
      list (#​1797).
    • Fix media duration parsing in mdhd box of MP4 files to handle -1
      values (#​1819).
    • Add support for identifying h263 box in MP4 files for H.263 video
      (#​1821).
    • Add AC-4 Level-4 ISO base media file format support
      (#​1265).
  • DataSource:
    • Update HttpEngineDataSource to allow use starting at version S
      extension 7 instead of API level 34
      (#​1262).
    • DataSourceContractTest: Assert that DataSource.getUri() returns the
      resolved URI (as documented). Where this is different to the requested
      URI, tests can indicate this using the new
      DataSourceContractTest.TestResource.Builder.setResolvedUri() method.
    • DataSourceContractTest: Assert that DataSource.getUri() and
      getResponseHeaders() return their 'open' value after a failed call to
      open() (due to a 'not found' resource) and before a subsequent
      close() call.
      • Overriding DataSourceContractTest.getNotFoundResources() allows
        test sub-classes to provide multiple 'not found' resources, and to
        provide any expected headers too. This allows to distinguish between
        HTTP 404 (with headers) and "server not found" (no headers).
  • Audio:
    • Automatically configure CTA-2075 loudness metadata on the codec if
      present in the media.
    • Ensure smooth volume ramp down when seeking.
    • Fix pop sounds that may occur during seeks.
    • Fix truncation error accumulation for Sonic's
      time-stretching/pitch-shifting algorithm.
    • Fix bug in SpeedChangingAudioProcessor that causes dropped output
      frames.
  • Video:
    • MediaCodecVideoRenderer avoids decoding samples that are neither
      rendered nor used as reference by other samples.
    • On API 35 and above, MediaCodecAdapter may now receive a null
      Surface in configure and calls to a new method detachOutputSurface
      to remove a previously set Surface if the codec supports this
      (MediaCodecInfo.detachedSurfaceSupported).
    • Use MediaCodecAdapter supplied pixel aspect ratio values if provided
      when processing onOutputFormatChanged
      (#​1371).
    • Add workaround for a device issue on Galaxy Tab S7 FE that causes 60fps
      secure H264 streams to be marked as unsupported
      (#​1619).
    • Add workaround for codecs that get stuck after the last sample without
      returning an end-of-stream signal.
  • Text:
    • Add a custom VoiceSpan and populate it for
      WebVTT voice spans
      (#​1632).
    • Ensure WebVTT in HLS with very large subtitle timestamps (which overflow
      a 64-bit long when represented as microseconds and multiplied by the
      90,000 MPEG timebase) are displayed
      (#​1763).
    • Support CEA-608 subtitles in Dolby Vision content
      (#​1820).
    • Fix playback hanging on DASH multi-period streams when CEA-608 subtitles
      are enabled (#​1863).
  • Metadata:
    • Assign the C.TRACK_TYPE_METADATA type to tracks containing icy or
      vnd.dvb.ait content.
  • Image:
    • Add ExternallyLoadedImageDecoder for simplified integration with
      external image loading libraries like Glide or Coil.
  • DataSource:
    • Add FileDescriptorDataSource, a new DataSource that can be used to
      read from a FileDescriptor
      (#​3757).
  • Effect:
    • Add DefaultVideoFrameProcessor workaround for minor SurfaceTexture
      scaling. SurfaceTexture may include a small scaling that cuts off a
      1-texel border around the edge of a cropped buffer. This is now handled
      such that output is closer to expected.
    • Speed up DefaultVideoFrameProcessor.queueInputBitmap(). As a result,
      exporting images to videos with Transformer is faster.
  • IMA extension:
    • Fix bug where clearing the playlist may cause an
      ArrayIndexOutOfBoundsException in
      ImaServerSideAdInsertionMediaSource.
    • Fix bug where server-side inserted DAI streams without a preroll can
      result in an ArrayIndexOutOfBoundsException when playing past the last
      midroll (#​1741).
  • Session:
    • Add MediaButtonReceiver.shouldStartForegroundService(Intent) to allow
      apps to suppress a play command coming in for playback resumption by
      overriding this method. By default, the service is always started and
      playback can't be suppressed without the system crashing the service
      with a ForegroundServiceDidNotStartInTimeException
      (#​1528).
    • Fix bug that caused custom commands sent from a MediaBrowser being
      dispatched to the MediaSessionCompat.Callback instead of the
      MediaBrowserServiceCompat variant of the method when connected to a
      legacy service. This prevented the MediaBrowser to receive the actual
      return value sent back by the legacy service
      (#​1474).
    • Handle IllegalArgumentException thrown by devices of certain
      manufacturers when setting the broadcast receiver for media button
      intents (#​1730).
    • Add command buttons for media items. This adds the Media3 API for what
      was known as Custom browse actions with the legacy library with
      MediaBrowserCompat. Note that with Media3 command buttons for media
      items are available for both, MediaBrowser and MediaController. See
      Custom Browse actions of AAOS.
    • Fix bug where a Media3 controller was sometimes unable to let a session
      app start a foreground service after requesting play().
    • Restrict CommandButton.Builder.setIconUri to only accept content Uris.
    • Pass connection hints of a Media3 browser to the initial
      MediaBrowserCompat when connecting to a legacy MediaBrowserCompat.
      The service can receive the connection hints passed in as root hints
      with the first call to onGetRoot().
    • Fix bug where a MediaBrowser connected to a legacy browser service,
      didn't receive an error sent by the service after the browser has
      subscribed to a parentid.
    • Improve interoperability behavior, so that a Media3 browser that is
      connected to a legacy MediaBrowserService doesn't request the children
      of a parentId twice when subscribing to a parent.
  • UI:
    • Make the stretched/cropped video in
      PlayerView-in-Compose-AndroidView workaround opt-in, due to issues
      with XML-based shared transitions. Apps using PlayerView inside
      AndroidView need to call
      PlayerView.setEnableComposeSurfaceSyncWorkaround in order to opt-in
      (#​1237,
      #​1594).
    • Add setFullscreenButtonState to PlayerView to allow updates of
      fullscreen button's icon on demand, i.e. out-of-band and not reactively
      to a click interaction
      (#​1590,
      #​184).
    • Fix bug where the "None" choice in the text selection is not working if
      there are app-defined text track selection preferences.
  • DASH extension:
    • Add support for periods starting in the middle of a segment
      (#​1440).
  • Smooth Streaming extension:
    • Fix a Bad magic number for Bundle error when playing SmoothStreaming
      streams with text tracks
      (#​1779).
  • RTSP extension:
    • Fix user info removal for URLs that contain encoded @​ characters
      (#​1138).
    • Fix crashing when parsing of RTP packets with header extensions
      (#​1225).
  • Decoder extensions (FFmpeg, VP9, AV1, etc.):
    • Add the IAMF decoder module, which provides support for playback of MP4
      files containing IAMF tracks using the libiamf native library to
      synthesize audio.
      • Playback is enabled with a stereo layout as well as 5.1 with
        spatialization together with optional head tracking enabled, but
        binaural playback support is currently not available.
    • Add 16 KB page support for decoder extensions on Android 15
      (#​1685).
  • Cast extension:
    • Stop cleaning the timeline after the CastSession disconnects, which
      enables the sender app to resume playback locally after a disconnection.
    • Populate CastPlayer's DeviceInfo when a Context is provided. This
      enables linking the MediaSession to a RoutingSession, which is
      necessary for integrating Output Switcher
      (#​1056).
  • Test Utilities:
    • DataSourceContractTest now includes tests to verify:
      • Input stream read position is updated.
      • Output buffer offset is applied correctly.
  • Demo app
    • Resolve the memory leaks in demo short-form app
      (#​1839).
  • Remove deprecated symbols:
    • Remove deprecated Player.hasPrevious, Player.hasPreviousWindow().
      Use Player.hasPreviousMediaItem() instead.
    • Remove deprecated Player.previous()method. Use
      Player.seekToPreviousMediaItem() instead.
    • Remove deprecated DrmSessionEventListener.onDrmSessionAcquired method.
    • Remove deprecated DefaultEncoderFactory constructors. Use
      DefaultEncoderFactory.Builder instead.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [androidx.media3:media3-exoplayer](https://github.com/androidx/media) | dependencies | minor | `1.4.1` → `1.10.1` | --- ### Release Notes <details> <summary>androidx/media (androidx.media3:media3-exoplayer)</summary> ### [`v1.10.1`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#1101-2026-05-12) [Compare Source](https://github.com/androidx/media/compare/1.10.0...1.10.1) This release includes the following changes since [1.10.0](#&#8203;1100-2026-03-25): - Common library: - Fix handling of `onAudioSessionIdChanged` in `SimpleBasePlayer` and `ForwardingSimpleBasePlayer`. - ExoPlayer: - Fix race condition related to audio session id generation that could lead to an `IllegalStateException` with tunneling mode. ([#&#8203;3099](https://github.com/androidx/media/issues/3099)). - Fix possible app crashes when recovering from decoder errors with renderer prewarming. - Fix issue where video artifacts were caused by supplying initialization data when using an AV1-based Dolby Vision codec ([#&#8203;3153](https://github.com/androidx/media/pull/3153)). - Track selection: - Adjust track selection logic in `VideoTrackInfo` to resolve fallback MIME types and move HDR and codec score preferences to quality preferences ([#&#8203;3135](https://github.com/androidx/media/issues/3135)). - Extractors: - MP3: Ignore Xing data length if it is longer than the known stream length ([#&#8203;3117](https://github.com/androidx/media/issues/3117)). - Fix `ArrayIndexOutOfBoundsException` in `Mp4Extractor` when `FLAG_OMIT_TRACK_SAMPLE_TABLE` is set and the track lacks a sync sample (`stss`) box. - Audio: - Fix bug where audio events may be misrouted if multiple audio renderers are added to the player. - Video: - Adjust logic for codec reuse at frame rate changes on API below 30 to avoid codec resets where they are not beneficial ([#&#8203;3120](https://github.com/androidx/media/issues/3120)). - Disable forced synchronization workaround in `queueSecureInputBuffer` for API 31+. The workaround was an artificial bottleneck that forced decryption to run serially which prevented garbled video due to a framework issue existing prior to API 31. - Image: - Fix issue in scrubbing mode where image updates would only take effect when the user "stops scrubbing" ([#&#8203;2815](https://github.com/androidx/media/issues/2815)). - Session: - Fix bug where `ForegroundServiceStartNotAllowedException` wasn't propagated across thread boundaries in case the application thread is not the main thread ([#&#8203;2499](https://github.com/androidx/media/issues/2499)). - Fix bug where `COMMAND_SEEK_TO_MEDIA_ITEM` is not available in a `MediaController` when connecting to a platform-only session that supports seeking to other items but no playlist modifications. - Fix issue where `MediaController` can't set media items on platform media sessions that don't allow `PREPARE_FROM` actions. - Fix bug where own process wasn't marked with `Controller.isTrusted()` on API 27 or before when connecting via platform controllers. - HLS extension: - Fix a bug where an `ArrayIndexOutOfBoundsException` is thrown during stream fallback if the track selection is a subset of the available tracks ([#&#8203;3161](https://github.com/androidx/media/issues/3161)). - Fix an issue where the initialization segment was not carried over across media playlist updates if the `#EXT-X-MAP` tag was not repeated in subsequent updates ([#&#8203;3105](https://github.com/androidx/media/issues/3105)). - DASH extension: - Fix crash in `SampleQueue` when seeking into a chunk that is currently being canceled. ### [`v1.10.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#1100-2026-03-25) [Compare Source](https://github.com/androidx/media/compare/1.9.4...1.10.0) This release includes the following changes since [1.9.1 release](#&#8203;191-2026-01-26): - Common library: - Promote `Player.mute()` and `Player.unmute()` from `UnstableApi` to stable. - Promote `Format.pcmEncoding` and `C.PcmEncoding` from `UnstableApi` to stable. - Add `Format.primaryTrackGroupId` to identify the primary group of embedded `Format` instances ([#&#8203;294](https://github.com/androidx/media/issues/294)). - 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()` in 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 ([#&#8203;2985](https://github.com/androidx/media/issues/2985)). - This required moving `DEFAULT_STUCK_PLAYING_DETECTION_TIMEOUT_MS` from `ExoPlayer` to `ExoPlayer.Builder` (without deprecation). - Fix a bug where `ProgressiveMediaSource` propagates out-of-date timeline info to the player, and the queued periods unexpectedly get removed ([#&#8203;3016](https://github.com/androidx/media/issues/3016)). - Fix issue where ExoPlayer would not request delayed audio focus when playback is requested during phone calls. - Fix bug where transitions from on-demand to live content may cause re-buffers at the end of the on-demand content ([#&#8203;3052](https://github.com/androidx/media/issues/3052)). - Add support for Dolby Vision Profile 10 ([#&#8203;2830](https://github.com/androidx/media/pull/2830)). - Fix bug where an uninitialized pre roll ad produced an `ArrayIndexOutOfBoundsException` ([#&#8203;3125](https://github.com/androidx/media/issues/3125)). - 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()`. - Track selection: - Change signature of `DefaultTrackSelector.selectAllTracks` to include the output array as a parameter, pre-populated with track overrides. - Fix issue where embedded metadata tracks are selected irrespective of whether the corresponding primary track is selected ([#&#8203;294](https://github.com/androidx/media/issues/294)). - Stabilize `TrackSelectionParameters` options for `preferredVideoLanguages`, `preferredVideoLabels`, `preferredAudioLabels`, `preferredTextLabels` and `selectTextByDefault`. - Extractors: - MP4: Support files with large `uuid` boxes before other boxes like `moov` ([#&#8203;3046](https://github.com/androidx/media/issues/3046)). - MP4: Add support for Versatile Video Coding (VVC) tracks in MP4 containers. - Inspector: - Breaking change: remove `FrameExtractor`. Users should now depend on the new `:media3-inspector-frame` module and update imports to `androidx.media3.inspector.frame.FrameExtractor`. - Introduce a new module for extracting and processing decoded video frames. - Audio: - Change underlying decoding library for the 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 ([#&#8203;2609](https://github.com/androidx/media/pull/2609)). - Improve the retry logic of `AudioOutput` initialization in `DefaultAudioSink` ([#&#8203;2905](https://github.com/androidx/media/issues/2905)). - Attempt to match the output layout of the speakers (or Spatializer if applicable) when decoding IAMF, both with the IAMF extension and media codec decoders, supported by new fields and logic in AudioCapabilities and AudioCapabilitiesReceiver. - Fix bug where playback gets stuck when playing a playlist of gapless audio in compressed offload mode. - Text: - VobSub: Use `START` and `STOP` SPU control commands to derive cue duration instead of always defaulting to 5 seconds ([#&#8203;2935](https://github.com/androidx/media/issues/2935)). - Metadata: - Increase default count of metadata renderers to four to cover all potential metadata tracks published by HLS variants and renditions ([#&#8203;3043](https://github.com/androidx/media/issues/3043)). - Effect: - Move `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: - Introduce 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. - Fix a bug 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. - Add `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 want to join the alpha testing group, please reach out to your account partner. - Session: - Fix a bug where large arrays in `MediaMetadata.artworkData` can crash the app. - Use type int for `@Player.Command` argument in the `ActionFactory` interface ([#&#8203;2933](https://github.com/androidx/media/issues/2933)). - Make `MediaSessionService` and `MediaLibraryService` a `LifecycleService`, allowing to attach lifecycle-aware operations to the service's lifecycle ([#&#8203;187](https://github.com/androidx/media/issues/187)). - Stop supporting device volume change commands from `MediaController` and `MediaBrowser` for local playbacks. Apps shouldn't 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 ([#&#8203;2933](https://github.com/androidx/media/issues/2933)). - Add static methods for creating `Intent` instances for Compose-based home screen widgets ([#&#8203;2933](https://github.com/androidx/media/issues/2933)). - Fix a 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' ([#&#8203;2997](https://github.com/androidx/media/issues/2997)). - Fix issue where system UI button placement workaround negatively affects other UI surface like Android Auto or manufacturers not needing the workaround ([#&#8203;3041](https://github.com/androidx/media/issues/3041)). - Fix issue where access to subscriptions was not synchronized ([#&#8203;3056](https://github.com/androidx/media/issues/3056)). - Workaround SysUI bug on API 29 where media session artwork in a particular size can crash SysUI and force the device to reboot ([#&#8203;3118](https://github.com/androidx/media/issues/3118)). - Fix notification artwork icon scaling on Android Q ([#&#8203;3084](https://github.com/androidx/media/issues/3084)). - 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 ([#&#8203;2288](https://github.com/androidx/media/issues/2288)). - Avoid large offscreen buffer in animating PlayerControlView. - Add `Player` Composable to `media3-ui-compose-material3` which combines a `ContentFrame` with customizable controls aligned to top, center, and bottom. - Hide playback position from the accessibility service to prevent continuous announcement update when `PlayerControlView` is visible. - HLS extension: - Support X-PLAYOUT-LIMIT with HLS interstitials ([#&#8203;2484](https://github.com/androidx/media/issues/2484)). - Support the `QUERYPARAM` attribute with `#EXT-X-DEFINE` ([#&#8203;1854](https://github.com/androidx/media/issues/1854)). - Optimize HLS playlist parsing by caching regular expression matchers ([#&#8203;3008](https://github.com/androidx/media/pull/3008)). - Expose ID3 (EMSG) metadata track in audio renditions ([#&#8203;3043](https://github.com/androidx/media/issues/3043)). - Allow location fallback upon encountering load errors, if redundant streams from different locations are available ([#&#8203;1988](https://github.com/androidx/media/issues/1988)). - Fix X-SNAP behaviour for HLS interstitials to correctly calculate start and resumption position ([#&#8203;3013](https://github.com/androidx/media/issues/3013)). - DASH extension: - Fix issue where tracks with unaligned segment start times cause delays or missed samples at the beginning of playback ([#&#8203;3057](https://github.com/androidx/media/issues/3057)). - Fix bug where timestamps of inband EMSG v0 metadata are not set correctly ([#&#8203;3024](https://github.com/androidx/media/issues/3024)). - RTSP extension: - Fixed regression in H.264 and H.265 streaming that would incorrectly parse samples of the same access unit that spanned multiple RTP packets. This resulted in visual artifacts and corruption in the video ([#&#8203;3121](https://github.com/androidx/media/issues/3121)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - Add MPEG-H UI manager support to the MPEG-H decoder extension ([#&#8203;3066](https://github.com/androidx/media/pull/3066)). - Cast extension: - Add `RemoteCastPlayer.Builder#setTrackSelector` method that enables the implementation of track selection for Cast playbacks. - Remove deprecated symbols: - Remove `ExperimentalFrameExtractor`. Use `androidx.media3.inspector.frame.FrameExtractor` instead. - Remove `ChannelMixingMatrix.create()`. Use `ChannelMixingMatrix.createForConstantGain()` instead. - Remove `androidx.media3.extractor.metadata.flac.VorbisComment`. Use `androidx.media3.extractor.metadata.vorbis.VorbisComment` instead. - Remove `MediaSource.prepareSource(MediaSourceCaller, TransferListener)`. Use `MediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId)` instead. ### [`v1.9.4`](https://github.com/androidx/media/releases/tag/1.9.4) [Compare Source](https://github.com/androidx/media/compare/1.9.3...1.9.4) - Effect: - Explicitly set `GL_DRAW_BUFFER` and `GL_READ_BUFFER` when transitioning from surfaceless context. ### [`v1.9.3`](https://github.com/androidx/media/releases/tag/1.9.3) [Compare Source](https://github.com/androidx/media/compare/1.9.2...1.9.3) - Audio: - Fix bug where playback gets stuck when playing a playlist of gapless audio in compressed offload mode. ### [`v1.9.2`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#192-2026-02-06) [Compare Source](https://github.com/androidx/media/compare/1.9.1...1.9.2) This release includes the following changes since [1.9.1 release](#&#8203;191-2026-01-26): - ExoPlayer: - Fix bug where `ProgressiveMediaSource` propagates out-of-date timeline info to player and the queued periods unexpectedly get removed ([#&#8203;3016](https://github.com/androidx/media/issues/3016)). - Session: - Fix issue where system UI button placement workaround negatively affects other UI surface like Android Auto or manufacturers not needing the workaround ([#&#8203;3041](https://github.com/androidx/media/issues/3041)). - Cast extension: - Fix bug where transferring from Cast to local playback was broken. ### [`v1.9.1`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#191-2026-01-26) [Compare Source](https://github.com/androidx/media/compare/1.9.0...1.9.1) This release includes the following changes since [1.9.0 release](#&#8203;190-2025-12-17): - Common Library: - Support date-time strings with only hours in the timezone offset ([#&#8203;2929](https://github.com/androidx/media/issues/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 ([#&#8203;2873](https://github.com/androidx/media/issues/2873)). - Avoid leaking `MediaItem` instances when repeatedly using `ExoPlayer.replaceMediaItem` on the same item ([#&#8203;2993](https://github.com/androidx/media/issues/2993)). - Prevent potential ANRs caused by emergency wake lock releases ([#&#8203;2979](https://github.com/androidx/media/issues/2979)). - Extractors: - MP3: Parse LAME ReplayGain data ([#&#8203;2840](https://github.com/androidx/media/pull/2840)). - Audio: - Correctly remove support for `AC4Profile22` and other legacy profiles when assessing AC-4 decoder support in Automotive scenarios ([#&#8203;2609](https://github.com/androidx/media/pull/2609)). - Video: - Discard video codecs on devices below API 30 when the content frame rate changes to avoid stuttering playback ([#&#8203;2941](https://github.com/androidx/media/issues/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 ([#&#8203;2935](https://github.com/androidx/media/issues/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 ([#&#8203;2948](https://github.com/androidx/media/issues/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 ([#&#8203;2976](https://github.com/androidx/media/issues/2976)). - Move bitmap scaling for notification icon off the main thread ([#&#8203;2829](https://github.com/androidx/media/issues/2829)). - Fix bug where author, writer and composer were not used as a fallback when converting from legacy `MediaMetadataCompat` and `MediaDescriptionCompat` ([#&#8203;3018](https://github.com/androidx/media/issues/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 ([#&#8203;2931](https://github.com/androidx/media/issues/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` ([#&#8203;2950](https://github.com/androidx/media/issues/2950)). - RTSP extension: - Correctly handle RTP Packets with timestamps that wrap around ([#&#8203;2930](https://github.com/androidx/media/issues/2930)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - Fix potential `NullPointerException` that can occur when seeking prior to processing the first video frame ([#&#8203;2965](https://github.com/androidx/media/issues/2965)). - Cast extension: - Fix bug preventing the `RemoteCastPlayer` timeline from updating correctly when replacing the playlist. ### [`v1.9.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#190-2025-12-17) [Compare Source](https://github.com/androidx/media/compare/1.8.1...1.9.0) - 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 ([#&#8203;1893](https://github.com/androidx/media/issues/1893)). - Fix `ForwardingPlayer` listener handling when the underlying delegate player uses reference equality for comparing listener instances ([#&#8203;2675](https://github.com/androidx/media/issues/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 ([#&#8203;2750](https://github.com/androidx/media/issues/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 ([#&#8203;2860](https://github.com/androidx/media/issues/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 ([#&#8203;2736](https://github.com/androidx/media/issues/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 ([#&#8203;2746](https://github.com/androidx/media/issues/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 ([#&#8203;2382](https://github.com/androidx/media/issues/2382), [#&#8203;2678](https://github.com/google/ExoPlayer/issues/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 ([#&#8203;2834](https://github.com/androidx/media/pull/2834)). - Append content resume offset when skipping ad playback after seek adjustment or auto transition ([#&#8203;2484](https://github.com/androidx/media/issues/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` ([#&#8203;2885](https://github.com/androidx/media/issues/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 ([#&#8203;1641](https://github.com/androidx/media/issues/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 ([#&#8203;2860](https://github.com/androidx/media/issues/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 ([#&#8203;1666](https://github.com/androidx/media/issues/1666)). - Extractors: - FLAC: Tighten header detection to reduce the chance of finding spurious headers in the encoded FLAC data, resulting in decoding errors ([#&#8203;558](https://github.com/androidx/media/issues/558)). - MP3: Allow gaps between (and before) ID3 tags at the beginning of MP3 files ([#&#8203;811](https://github.com/androidx/media/issues/811), [#&#8203;5718](https://github.com/google/ExoPlayer/issues/5718)). - MP3: Increase sniffing limit to 128kB to match the existing search limit for a sync byte ([#&#8203;2713](https://github.com/androidx/media/issues/2713)). - 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 ([#&#8203;2839](https://github.com/androidx/media/issues/2839)). - 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) ([#&#8203;2848](https://github.com/androidx/media/issues/2848)). - 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 ([#&#8203;2683](https://github.com/androidx/media/issues/2683)). - MP4: Improve sniffing efficiency of very large files by assuming a `stbl` box larger than 1MB implies the file must be non-fragmented ([#&#8203;2650](https://github.com/androidx/media/issues/2650)). - 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 ([#&#8203;2754](https://github.com/androidx/media/issues/2754)). - MP4: Ignore tracks with missing `stsd` box (instead of failing to parse the whole file). - Matroska: Add support for DTS-HD detection ([#&#8203;6225](https://github.com/google/ExoPlayer/issues/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. - MPEG-TS: Fix `IllegalArgumentException` from `ReorderingBufferQueue` caused by PES packets with no timestamp ([#&#8203;2764](https://github.com/androidx/media/issues/2764)). - Add support for extracting HEIC Motion Photos. The `HeifExtractor` can now parse HEIC files containing embedded video and audio tracks. - 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 requiring a specific timestamp. - 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. - Audio: - Make `AudioProcessor` instances aware of seeking. - Allow injecting the new `AudioOutputProvider` interface into `DefaultAudioSink.Builder` to support custom audio output paths. The default is `AudioTrackAudioOutputProvider`. - Handle seeks in `GainProcessor`. - Utilize AC-4 decoder profile and level capabilities in track format support assessment ([#&#8203;2580](https://github.com/androidx/media/pull/2580)). - Avoid potential delays caused by handling routing change callbacks at the beginning of playback ([#&#8203;2646](https://github.com/androidx/media/issues/2646)). - Allow codec reuse for EAC3, EAC3-JOC and AC-4 formats ([#&#8203;1346](https://github.com/androidx/media/pull/1346)). - Add support for float PCM samples in `Sonic`. - Add support for 16 bit PCM samples in `ToFloatPcmAudioProcessor`. - Video: - Disable codec reuse for Dolby-Vision content with different profiles. - Re-enable workaround for wrongly reported performance points for secure codecs ([#&#8203;2856](https://github.com/androidx/media/issues/2856)). - Text: - Fix parsing of CEA-6/708 subtitles in Dolby Vision content ([#&#8203;2775](https://github.com/androidx/media/issues/2775)). - Image: - Fix ScrubbingMode issue where player gets stuck while scrubbing a DASH thumbnail track ([#&#8203;2815](https://github.com/androidx/media/issues/2815)). - DRM: - Change the return type of `MediaDrmCallback` methods from `byte[]` to a new `MediaDrmCallback.Response` type, to allow returning extra optional information. This is a source breaking change, but breakages can be easily resolved by wrapping the previous `byte[]` return value with `new Response` before returning. - Add key request info like URL and latency to `AnalyticsListener.onDrmKeysLoaded` ([#&#8203;1001](https://github.com/androidx/media/issues/1001)). - Move provisioning request data from a URL parameter to the POST body. - Effect: - Add `Presentation.copyWithUnsetSideRoundedTo` to round the unset output side when `Presentation` is created with a single side length. - Muxers: - Add `MediaMuxerCompat`, a drop-in replacement for framework `MediaMuxer`. - Add `MuxerUtil.createMotionPhotoFromJpegImageAndBmffVideo()` to allow Motion Photo creation. - Add `WebmMuxer` to allow muxing of `OPUS`, `VORBIS`, `VP8` and `VP9` media streams into a `webm` file format. - IMA extension: - Removal of custom proguard rules, so that apps can use those released in IMA android archive instead. - Add `ImaServerSideAdInsertionUriBuilder.setNetworkCode`, a new API for setting the Google Ad Manager network code for the IMA SDK to handle ads identifiers as specified in Google Ad Manager settings. Network codes are optional but recommended for Full service stream requests. To find the network code, see [this article](http://support.google.com/admanager/answer/7674889). - Bump IMA dependency to 3.37.0 which requires enabling core library desugaring. This must also be enabled by dependent apps too. See IMA's [config notes](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/get-started#2.-add-the-ima-sdk-to-your-project). - Support IMA DAI custom UI options in SSAI URI builder. Custom UI options for server side ad insertion include “Skippable” and “About This Ad” rendering support. The feature is currently available for selected publishers behind an allow list. This change also upgrades the IMA SDK version to 3.38.0 ([release notes](https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/history)) to access the custom UI options API. - Fix issue where content preparation error for content after an ad would be wrongly reported as an ad playback error ([#&#8203;2656](https://github.com/androidx/media/issues/2656)). - Session: - Add new parameter to `MediaSession.Callback.onPlaybackResumption` to indicate if the call happens to gather information only or to start playback ([#&#8203;1764](https://github.com/androidx/media/issues/1764)). - Update `MediaSession.ControllerInfo.isTrusted` to also declare controllers from the own app as trusted ([#&#8203;2542](https://github.com/androidx/media/issues/2542)). - Add `MediaSessionService.triggerNotificationUpdate` to manually trigger a notification update ([#&#8203;1833](https://github.com/androidx/media/issues/1833)). - Add `ProgressListener` to custom command methods. - Change the default value for `MediaLibrarySession.Builder.setLibraryErrorReplicationMode` to non fatal. - Add a `Context` parameter to `MediaButtonReceiver.onForegroundServiceStartNotAllowedException` ([#&#8203;2625](https://github.com/androidx/media/pull/2625)). - Read the volume control ID from the platform `PlaybackInfo` instead of fetching it via binder. This ensures that playback type and volume control ID are read atomically and do match to each other. - Fix bug where `ACTION_UP` key events were filtered out before passing them to the callback for custom handling. This brings parity with what media1 did and the platform does ([#&#8203;2637](https://github.com/androidx/media/issues/2637)). - Fix bug where `getCurrentTimeline()` was called by `PlayerWrapper` even when the command isn't available ([#&#8203;2665](https://github.com/androidx/media/issues/2665)). - Fix bug where a message was left in the message queue of the main looper which caused a memory leak after the service terminated ([#&#8203;2692](https://github.com/androidx/media/issues/2692)). - When connected to a legacy session app with a `MediaBrowser`, custom commands are sent to the session only if the custom action is advertised as a custom action in `PlaybackStateCompat` of the legacy session. All other custom actions are sent to the service. - Implemented `onAudioSessionIdChanged` to notify media controllers when an audio session ID is set by the session ([#&#8203;244](https://github.com/androidx/media/issues/244)). - Fix bug where `KEYCODE_HEADSETHOOK` did not start the player upon and media key event `Intent` arriving in `onStartCommand()`. This is fixed by handling 'KEYCODE\_HEADSETHOOK' just like `KEYCODE_MEDIA_PLAY_PAUSE` ([#&#8203;2816](https://github.com/androidx/media/pull/2816)). - Fix a bug where Surface size was not communicated between the session and the controller, resulting in the failure to apply video effects in demo-session. If you are using a controller, this might be a breaking change if your player cannot handle a `setVideoSurfaceHolder` call. - Fix propagation of non-`String` `CharSequence` metadata values like span-styled strings ([#&#8203;2853](https://github.com/androidx/media/issues/2853)). - 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. - 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. - UI: - Add `ProgressStateWithTickInterval` class and the corresponding `rememberProgressStateWithTickInterval` Composable to `media3-ui-compose` module. This state holder is used in `demo-compose` to display the current position and duration in text form. - Add `MuteButtonState` to `ui-compose` that handles muting of the `Player` volume. This state holder is used in `demo-compose` to display mute/unmute toggle button. - Add `ProgressStateWithTickCount` classes and the corresponding `rememberProgressStateWithTickCount` Composable to `media3-ui-compose` module. This state holder is used in `demo-compose` to display progress as a horizontal read-only progress bar. - Add `ContentFrame` Composable to `media3-ui-compose` which combines `PlayerSurface` management with aspect ratio resizing and covering with a shutter. - Work around a known API 34 platform bug causing stretched/cropped videos when using `SurfaceView` inside a Compose `AndroidView` and hence affecting `ContentFrame` and `PlayerSurface` Composables with `SURFACE_TYPE_SURFACE_VIEW` ([#&#8203;1237](https://github.com/androidx/media/issues/1237), [#&#8203;2811](https://github.com/androidx/media/issues/2811)). - Create a new `media3-ui-compose-material3` module and add Material3-themed Composables (PlayPauseButton, NextButton, PreviousButton, SeekBackButton, SeekForwardButton, RepeatButton, ShuffleButton, MuteButton) to it. - 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. - Add support for placing a media route button in the `PlayerView`. - Use `BidiFormatter` to correctly display punctuation in RTL text subtitles ([#&#8203;11214](https://github.com/google/ExoPlayer/issues/11214)). - HLS extension: - Parse HLS interstitial skip attributes. - Map skip control attributes from the HLS playlist and the asset list document into the `AdPlaybackState` for public access. - Fix bug where the start time of the playlist was dropped when the EXT-X-PROGRAM-START-DATE tag defining the start time was removed from a playlist ([#&#8203;2760](https://github.com/androidx/media/issues/2760)). - Use binary search to find the segment index of a given position in the playlist ([#&#8203;2826](https://github.com/androidx/media/pull/2826)). - 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 ([#&#8203;2859](https://github.com/androidx/media/issues/2859)). - Accept space as a date/time separator in ISO 8601 date-time strings. - Properly handle fetching the next chunk for an `HlsMediaPlaylist` with no segments ([#&#8203;2821](https://github.com/androidx/media/issues/2821)). - Use the default start position for pre rolls with live streams. - DASH extension: - Fix `UnsupportedOperationException` when playing DASH streams with a non-hierarchical `data:` URI manifest ([#&#8203;2688](https://github.com/androidx/media/issues/2688)). - Reset `LiveConfiguration` to the value provided by the `MediaItem` of the `DashMediaSource` when released and when the media item is updated by the user ([#&#8203;2606](https://github.com/androidx/media/issues/2606)). - Avoid crashes caused by invalid manifest updates that were not reported as player errors ([#&#8203;2805](https://github.com/androidx/media/issues/2805)). - RTSP extension: - Handle error of missing RTP packets when processing fragmented NAL units for H264 and H265 ([#&#8203;2613](https://github.com/androidx/media/issues/2613)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - AV1 Extension: The AV1 software decoder now uses the high-performance `dav1d` library, replacing the previous `libgav1` implementation for improved decoding speed. - 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 ([#&#8203;2887](https://github.com/androidx/media/issues/2887)). - Cast extension: - Add `CastPlayer.Builder`, which enables `CastPlayer` to do both local and Cast playback. To keep the old `CastPlayer` behavior of supporting only Cast playback, you can use `RemoteCastPlayer`. The pre-existing `CastPlayer` constructors keep their old behavior, but are deprecated in favour of using the `CastPlayer` or `RemoteCastPlayer` builders instead. - Stop enforcing a non-null mime type in `DefaultMediaItemConverter`. - Use `MediaItem.mediaMetadata.mediaType` to infer the Cast MEDIA\_TYPE to use in `DefaultCastOptionsProvider#toMediaQueueItem`, when available. - Enable remote to local transfers in `DefaultCastOptionsProvider`. - Add support for Cast in the Session demo. - Add support for displaying a media route button on a Composable UI. - Add support for displaying a media route button on an action bar menu. - Add support for displaying a media route button as a View UI. - Change the Cast media channel message type used to populate the Cast receiver's media queue from "QUEUE\_LOAD" to "LOAD" ([CAF docs](https://developers.google.com/cast/docs/reference/web_receiver/cast.framework.messages#.MessageType)). This may affect receiver applications' relying on a specific message format to load the media queue ([#&#8203;3080](https://github.com/androidx/media/issues/3080)). - Test Utilities: - Add maximum time diff for the auto-advancing behavior of `FakeClock`. It defaults to 1 second, but is configurable via `FakeClock.Builder`. - Add maximum time diff between messages for `RobolectricUtil.runMainLooperUntil` (and `runLooperUntil`). It defaults to 1 second, but is configurable via new overloads of these methods. - Move `CapturingRenderersFactory` from `test-utils` to `test-utils-robolectric`. - Remove deprecated symbols: - Remove deprecated `DefaultPreloadManager` constructor. Use `DefaultPreloadManager.Builder` instead. - Removed deprecated `EditedMediaItemSequence` constructors. Use `EditedMediaItemSequence.Builder` instead. - Remove `BitmapFactoryImageDecoder.BitmapDecoder`. Use `ExternallyLoadedImageDecoder` instead. - Remove deprecated `ShadowMediaCodecConfig.forAllSupportedMimeTypes()`. Use `ShadowMediaCodecConfig.withAllDefaultSupportedCodecs()` instead. - Remove deprecated `ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes()`. Use `ShadowMediaCodecConfig.withNoDefaultSupportedCodecs()` instead. ### [`v1.8.1`](https://github.com/androidx/media/releases/tag/1.8.1) [Compare Source](https://github.com/androidx/media/compare/1.8.0...1.8.1) - Effect: - Explicitly set `GL_DRAW_BUFFER` and `GL_READ_BUFFER` when transitioning from surfaceless context. ### [`v1.8.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#180-2025-07-30) [Compare Source](https://github.com/androidx/media/compare/1.7.1...1.8.0) This release includes the following changes since the [1.7.1 release](#&#8203;171-2025-05-16): - Common Library: - Add support for replacing the player in `ForwardingSimpleBasePlayer`. - ExoPlayer: - Add getter for shuffle mode to the `ExoPlayer` interface ([#&#8203;2522](https://github.com/androidx/media/pull/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 ([#&#8203;1191](https://github.com/androidx/media/issues/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 ([#&#8203;2495](https://github.com/androidx/media/issues/2495)). - Add `cloneAndMove` to `ShuffleMode` with a default implementation ([#&#8203;2226](https://github.com/androidx/media/pull/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 ([#&#8203;2337](https://github.com/androidx/media/issues/2337)). - Fix memory leak in `MergingMediaSource`, for example used when sideloading subtitles ([#&#8203;2338](https://github.com/androidx/media/issues/2338)). - Allow `CmcdConfiguration.Factory` to return `null` to disable CMCD logging for specific media items ([#&#8203;2386](https://github.com/androidx/media/pull/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 ([#&#8203;2417](https://github.com/androidx/media/issues/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 ([#&#8203;2084](https://github.com/androidx/media/issues/2084)). - JPEG: Support motion photos that don't have an Exif segment at the start ([#&#8203;2552](https://github.com/androidx/media/issues/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` ([#&#8203;9373](https://github.com/google/ExoPlayer/issues/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 ([#&#8203;2327](https://github.com/androidx/media/issues/2327)). - Fix parsing of H.265 SEI units to fully skip unrecognized SEI types ([#&#8203;2456](https://github.com/androidx/media/issues/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 ([#&#8203;2012](https://github.com/androidx/media/issues/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)` ([#&#8203;2194](https://github.com/androidx/media/issues/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 ([#&#8203;2339](https://github.com/androidx/media/issues/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 ([#&#8203;2258](https://github.com/androidx/media/issues/2258)). - Video: - Extend detached surface workaround to "lenovo" and "motorola" devices ([#&#8203;2059](https://github.com/androidx/media/issues/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 ([#&#8203;2059](https://github.com/androidx/media/issues/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 ([#&#8203;2408](https://github.com/androidx/media/issues/2408)). - Text: - Add support for VobSub tracks in MP4 files ([#&#8203;2510](https://github.com/androidx/media/issues/2510)). - Fix a playback stall when a subtitle segment initially fails to load and later loads successfully, followed by several empty subtitle segments ([#&#8203;2517](https://github.com/androidx/media/issues/2517)). - Fix SSA and SubRip to display an in-progress cue when enabling subtitles ([#&#8203;2309](https://github.com/androidx/media/issues/2309)). - Fix playback getting stuck when switching from a stream with a subtitle error to a live stream with an empty subtitle track ([#&#8203;2328](https://github.com/androidx/media/issues/2328)). - Fix garbled CEA-608 subtitles when playing H.262 streams containing B-frames ([#&#8203;2372](https://github.com/androidx/media/issues/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) ([#&#8203;2384](https://github.com/androidx/media/issues/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 ([#&#8203;2124](https://github.com/androidx/media/issues/2124)). - Metadata: - Added support for retrieving media duration and `Timeline` to `MetadataRetriever` and migrated it to an instance-based, `AutoCloseable` API. Use the new `Builder` to create an instance for a `MediaItem`, then call `retrieveTrackGroups()`, `retrieveTimeline()`, and `retrieveDurationUs()` to get `ListenableFuture`s for the metadata. The previous static methods are now deprecated ([#&#8203;2462](https://github.com/androidx/media/issues/2462)). - Image: - Limit decoded bitmaps to the display size in `BitmapFactoryImageDecoder`, to avoid an app crashing with `Canvas: trying to draw too large bitmap.` from `PlayerView` when trying to display very large (e.g. 50MP) images. - Change the signature of `DefaultRenderersFactory.getImageDecoderFactory()` to take a `Context` parameter. - Align the max bitmap output size used in `CompositionPlayer` with that already used in `Transformer` (meaning `CompositionPlayer` does not consider the display size when decoding bitmaps, unlike `ExoPlayer`). - DRM: - Add new overload of `OfflineLicenseHelper.newWidevineInstance` accepting a `MediaItem.DrmConfiguration` so that HTTP request headers can be applied correctly ([#&#8203;2169](https://github.com/androidx/media/issues/2169)). - Effect: - Add `Presentation.createForShortSide(int)` that creates a `Presentation` that ensures the shortest side always matches the given value, regardless of input orientation. - Muxers: - Fix a bug where correct sample flags were not set for audio samples in fragmented MP4. - `writeSampleData()` API now uses muxer specific `BufferInfo` class instead of `MediaCodec.BufferInfo`. - Add `Muxer.Factory#supportsWritingNegativeTimestampsInEditList` which defaults to false. - IMA extension: - Fix a bug where a load error in one ad may accidentally invalidate another ad group. - Fix bug where ad groups after the end of a VOD window stalled playback. Ads groups with a start time after the window are not enqueued into the `MediaPeriodQueue` anymore ([#&#8203;2215](https://github.com/androidx/media/issues/2215)). - 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. - 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 ([#&#8203;2330](https://github.com/androidx/media/pull/2330)). - Fix bug where calling `setSessionExtras` from the main thread when running the player from a different application thread then the main thread caused an `IllegalStateException` ([#&#8203;2265](https://github.com/androidx/media/pull/2265)). - Don't automatically show a notification if a player is set up with media items without preparing or playing them ([#&#8203;2423]()[#&#8203;2423](https://github.com/androidx/media/issues/2423)). This behavior is configurable via `MediaSessionService.setShowNotificationForIdlePlayer`. - Add custom `PlaybackException` for all or selected controllers. - Fix bug where seeking in a live stream on a `MediaController` can cause an `IllegalArgumentException`. - For live streams, stop publishing a playback position and the ability to seek in the current item for platform media controllers, to avoid position artefacts in the Android Auto UI (and other controllers using this information from the platform media session) ([#&#8203;1758](https://github.com/androidx/media/issues/1758)). - Fix a bug where passing null into `getLibraryRoot` of a `MediaBrowser` connected to a legacy `MediaBrowserServiceCompat` produced a `NullPointerException`. - Fix a bug where sending custom actions, a search result or a getItem request crashed the legacy session app with a `ClassNotFoundException`. - Fix a bug where `MediaItem.LocalConfiguration.uri` was shared to the platform sessions's `MediaMetadata`. To intentionally share a URI to allow controllers to re-request the media, set `MediaItem.RequestMetadata.mediaUri` instead. - UI: - Fix bug where `PlayerSurface` inside re-usable components like `LazyColumn` didn't work correctly ([#&#8203;2493](https://github.com/androidx/media/issues/2493)). - Fix a Compose bug which resulted in a gap between setting the initial button states and observing the change in state (e.g. icon shapes or being enabled). Any changes made to the Player outside of the observation period are now picked up ([#&#8203;2313](https://github.com/androidx/media/issues/2313)). - Add state holders and composables to the `media3-ui-compose` module for `SeekBackButtonState` and `SeekForwardButtonState`. - Add support for ExoPlayer's scrubbing mode to `PlayerControlView`. When enabled, this puts the player into scrubbing mode when the user starts dragging the scrubber bar, issues a `player.seekTo` call for every movement, and then exits scrubbing mode when the touch is lifted from the screen. This integration can be enabled with either `time_bar_scrubbing_enabled = true` in XML or the `setTimeBarScrubbingEnabled(boolean)` method from Java/Kotlin. - Make `PlayerSurface` accept a nullable `Player` argument. - Downloads: - Add partial download support for progressive streams. Apps can prepare a progressive stream with `DownloadHelper`, and request a `DownloadRequest` from the helper with specifying the time-based media start and end positions that the download should cover. The returned `DownloadRequest` carries the resolved byte range, with which a `ProgressiveDownloader` can be created and download the content correspondingly. - Add `DownloadHelper.Factory` with which the static `DownloadHelper.forMediaItem()` methods are replaced. - Add `Factory` for `SegmentDownloader` implementations. - Add partial download support for adaptive streams. Apps can prepare an adaptive stream with `DownloadHelper`, and request a `DownloadRequest` from the helper with specifying the time-based media start and end positions that the download should cover. The returned `DownloadRequest` carries the resolved time range, with which a concrete `SegmentDownloader` can be created and download the content correspondingly. - Cronet extension: - Add automatic cookie handling ([#&#8203;5975](https://github.com/google/ExoPlayer/issues/5975)). - HLS extension: - Fix bug where `HlsSampleStreamWrapper` attempts to seek inside buffer when there are no chunks available in the buffer [#&#8203;2598](https://github.com/androidx/media/issues/2598). - Fix bug where track selection changes after loading low-latency parts and preload hints can cause playback to get stuck or freeze ([#&#8203;2299](https://github.com/androidx/media/issues/2299)). - Prevent excessive reloads by waiting for half the target duration when `CAN-BLOCK-RELOAD=YES` is not honored by the server ([#&#8203;2317](https://github.com/androidx/media/pull/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 ([#&#8203;2558](https://github.com/androidx/media/issues/2558)). - Fix playlist parsing to accept `\f` (form feed) in quoted string attribute values ([#&#8203;2420](https://github.com/androidx/media/issues/2420)). - Support updating interstitials with the same ID ([#&#8203;2427](https://github.com/androidx/media/pull/2427)). - Fix bug where playlist load errors are sometimes not propagated once a live stream runs out of segments to load ([#&#8203;2401]()[#&#8203;2401](https://github.com/androidx/media/issues/2401)). - Group subtitle renditions by NAME tag, similar to how audio renditions are grouped already ([#&#8203;1666](https://github.com/androidx/media/issues/1666)). - Support X-ASSET-LIST and live streams with `HlsInterstitialsAdsLoader`. - DASH extension: - Fix issue where trick-play adaptation set is merged with its main adaptation set to form an invalid `TrackGroup` ([#&#8203;2148](https://github.com/androidx/media/issues/2148)). - Fix bug where shortening a DASH period duration can throw an exception when samples beyond the new duration have already been read by the rendering pipeline ([#&#8203;2440](https://github.com/androidx/media/issues/2440)). - Fix bug where redirect wasn't followed when using CMCD query parameters ([#&#8203;2475](https://github.com/androidx/media/issues/2475)). - RTSP extension: - Add support for RTP Aggregation Packet for H265 in accordance with RFC [7798#4](https://github.com/7798/media/issues/4).4.2 ([#&#8203;2413](https://github.com/androidx/media/pull/2413)). - Fix `RtspClient` to use the location uri as provided when processing an HTTP 302 response ([#&#8203;2398](https://github.com/androidx/media/issues/2398)). - Add parsing support for SessionDescriptions containing lines with trailing whitespace characters ([#&#8203;2357](https://github.com/androidx/media/issues/2357)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - Fix bug where `DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChange` has no effect for audio decoder extensions ([#&#8203;2258](https://github.com/androidx/media/issues/2258)). - Cast extension: - Add support for `setVolume()`, and `getVolume()` ([#&#8203;2279](https://github.com/androidx/media/pull/2279)). - Prevent CastPlayer from entering STATE\_BUFFERING while the timeline is empty. - Add support for `getDeviceVolume()`, `setDeviceVolume()`, `getDeviceMuted()`, and `setDeviceMuted()` ([#&#8203;2089](https://github.com/androidx/media/issues/2089)). - Test Utilities: - Add `advance(player).untilPositionAtLeast` and `untilMediaItemIndex` to `TestPlayerRunHelper` in order to advance the player until a specified position is reached. In most cases, these methods are more reliable than the existing `untilPosition` and `untilStartOfMediaItem` methods. - Move `FakeDownloader` to `test-utils-robolectric` module for reuse in other tests. - Removed `transformer.TestUtil.addAudioDecoders(String...)`, `transformer.TestUtil.addAudioEncoders(String...)`, and `transformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig, String...)`. Use `ShadowMediaCodecConfig` to configure shadow encoders and decoders instead. - Replaced the "exotest" prefix with "media3" in codec names reported by `ShadowMediaCodecConfig`. - Remove deprecated symbols: - Removed deprecated `SegmentDownloader` constructor `SegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory, Executor)` and the corresponding constructors in its subclasses `DashDownloader`, `HlsDownloader` and `SsDownloader`. - Removed deprecated `Player.hasNext()`, `Player.hasNextWindow()`. Use `Player.hasNextMediaItem()` instead. - Removed deprecated `Player.next()`. Use `Player.seekToNextMediaItem()` instead. - Removed deprecated `Player.seekToPreviousWindow()`. Use `Player.seekToPreviousMediaItem()` instead. - Removed deprecated `Player.seekToNextWindow()`. Use `Player.seekToNextMediaItem()` instead. - Removed deprecated `BaseAudioProcessor` in `exoplayer` module. Use `BaseAudioProcessor` under `common` module. - Remove deprecated `MediaCodecVideoRenderer` constructor `MediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor, MediaCodecSelector, long, boolean, @&#8203;Nullable Handler, @&#8203;Nullable VideoRendererEventListener, int, float, @&#8203;Nullable VideoSinkProvider)`. ### [`v1.7.1`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#171-2025-05-16) This release has the same code as 1.6.1 and is being released to ensure it appears as a 'newer' release than 1.7.0, which was an alpha release accidentally tagged as stable (see below). ### [`v1.7.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#170-2025-05-16) This release should have been `1.7.0-alpha01`, but was accidentally tagged `1.7.0` (i.e. stable) on maven.google.com. **Please do not use it.** Stay on 1.6.1 or upgrade to 1.7.1 (which has the same code as 1.6.1). ### [`v1.6.1`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#161-2025-04-14) [Compare Source](https://github.com/androidx/media/compare/1.6.0...1.6.1) This release includes the following changes since the [1.6.0 release](#&#8203;160-2025-03-26): - Common Library: - Add `PlaybackParameters.withPitch(float)` method for easily copying a `PlaybackParameters` with a new `pitch` value ([#&#8203;2257](https://github.com/androidx/media/issues/2257)). - ExoPlayer: - Fix issue where media item transition fails due to recoverable renderer error during initialization of the next media item ([#&#8203;2229](https://github.com/androidx/media/issues/2229)). - Fix issue where `ProgressiveMediaPeriod` throws an `IllegalStateException` as `PreloadMediaSource` attempts to call its `getBufferedDurationUs()` before it is prepared ([#&#8203;2315](https://github.com/androidx/media/issues/2315)). - Fix sending `CmcdData` in manifest requests for DASH, HLS, and SmoothStreaming ([#&#8203;2253](https://github.com/androidx/media/pull/2253)). - Ensure `AdPlaybackState.withAdDurationsUs(long[][])` can be used after ad groups have been removed. The user still needs to pass in an array of durations for removed ad groups which can be empty or null ([#&#8203;2267](https://github.com/androidx/media/issues/2267)). - Extractors: - MP4: Parse `alternate_group` from the `tkhd` box and expose it as an `Mp4AlternateGroupData` entry in each track's `Format.metadata` ([#&#8203;2242](https://github.com/androidx/media/issues/2242)). - Audio: - Fix offload issue where the position might get stuck when playing a playlist of short content ([#&#8203;1920](https://github.com/androidx/media/issues/1920)). - Session: - Lower aggregation timeout for platform `MediaSession` callbacks from 500 to 100 milliseconds and add an experimental setter to allow apps to configure this value. - Fix issue where notifications reappear after they have been dismissed by the user ([#&#8203;2302](https://github.com/androidx/media/issues/2302)). - Fix a bug where the session returned a single-item timeline when the wrapped player is actually empty. This happened when the wrapped player doesn't have `COMMAND_GET_TIMELINE` available while `COMMAND_GET_CURRENT_MEDIA_ITEM` is available and the wrapped player is empty ([#&#8203;2320](https://github.com/androidx/media/issues/2320)). - Fix a bug where calling `MediaSessionService.setMediaNotificationProvider` is silently ignored after other interactions with the service like `setForegroundServiceTimeoutMs` ([#&#8203;2305](https://github.com/androidx/media/issues/2305)). - UI: - Enable `PlayerSurface` to work with `ExoPlayer.setVideoEffects` and `CompositionPlayer`. - Fix bug where `PlayerSurface` can't be recomposed with a new `Player`. - HLS extension: - Fix issue where chunk duration wasn't set in `CmcdData` for HLS media, causing an assertion failure when processing encrypted media segments ([#&#8203;2312](https://github.com/androidx/media/issues/2312)). - RTSP extension: - Add support for URI with RTSPT scheme as a way to configure the RTSP session to use TCP ([#&#8203;1484](https://github.com/androidx/media/issues/1484)). - Cast extension: - Add support for playlist metadata ([#&#8203;2235](https://github.com/androidx/media/pull/2235)). ### [`v1.6.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#160-2025-03-26) [Compare Source](https://github.com/androidx/media/compare/1.5.1...1.6.0) This release includes the following changes since the [1.5.1 release](#&#8203;151-2024-12-19): - Common Library: - Add `AudioManagerCompat` and `AudioFocusRequestCompat` to replace the equivalent classes in `androidx.media`. - Upgrade Kotlin from 1.9.20 to 2.0.20 and use Compose Compiler Gradle plugin. Upgrade KotlinX Coroutines library from 1.8.1 to 1.9.0. - Remove `Format.toBundle(boolean excludeMetadata)` method, use `Format.toBundle()` instead. - Fix bug in `SimpleBasePlayer` where setting a new `currentMediaItemIndex` in `State` after `setPlaylist` with `null` `MediaMetadata` does not reevaluate the metadata ([#&#8203;1940](https://github.com/androidx/media/issues/1940)). - Change `SimpleBasePlayer.State` access from protected to public to make it easier to handle updates in other classes ([#&#8203;2128](https://github.com/androidx/media/issues/2128)). - ExoPlayer: - Add `MediaExtractorCompat`, a new class that provides equivalent features to platform `MediaExtractor`. - Add experimental 'ExoPlayer' pre-warming support for playback using `MediaCodecVideoRenderer`. You can configure `DefaultRenderersFactory` through `experimentalSetEnableMediaCodecVideoRendererPrewarming` to provide a secondary `MediaCodecVideoRenderer` to `ExoPlayer`. If enabled, `ExoPlayer` pre-processes the video of consecutive media items during playback to reduce media item transition latency. - Reduce default values for `bufferForPlaybackMs` and `bufferForPlaybackAfterRebufferMs` in `DefaultLoadControl` to 1000 and 2000 ms respectively. - Initialize `DeviceInfo` and device volume asynchronously (if enabled using `setDeviceVolumeControlEnabled`). These values aren't available instantly after `ExoPlayer.Builder.build()`, and `Player.Listener` notifies changes through `onDeviceInfoChanged` and `onDeviceVolumeChanged`. - Initial audio session id is no longer immediately available after creating the player. You can use `AnalyticsListener.onAudioSessionIdChanged` to listen to the initial update if required. - Consider language when selecting a video track. By default, select a 'main' video track that matches the language of the selected audio track, if available. Explicit video language preferences can be expressed with `TrackSelectionParameters.Builder.setPreferredVideoLanguage(s)`. - Add `selectedAudioLanguage` parameter to `DefaultTrackSelector.selectVideoTrack()` method. - Add `retryCount` parameter to `MediaSourceEventListener.onLoadStarted` and corresponding `MediaSourceEventListener.EventDispatcher` methods. - Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item ([#&#8203;1698](https://github.com/androidx/media/issues/1698)). - Move `BasePreloadManager.Listener` to a top-level `PreloadManagerListener`. - `RenderersFactory.createSecondaryRenderer` can be implemented to provide secondary renderers for pre-warming. Pre-warming enables quicker media item transitions during playback. - Enable sending `CmcdData` for manifest requests in adaptive streaming formats DASH, HLS, and SmoothStreaming ([#&#8203;1951](https://github.com/androidx/media/issues/1951)). - Provide `MediaCodecInfo` of the codec that will be initialized in `MediaCodecRenderer.onReadyToInitializeCodec` ([#&#8203;1963](https://github.com/androidx/media/pull/1963)). - Change `AdsMediaSource` to allow the `AdPlaybackStates` to grow by appending ad groups. Invalid modifications are detected and throw an exception. - Fix issue where additional decode-only frames may be displayed in quick succession when transitioning to content media after a mid-roll ad. - Make `DefaultRenderersFactory` add two `MetadataRenderer` instances to enable apps to receive two different schemes of metadata by default. - Reevaluate whether the ongoing load of a chunk should be cancelled when playback is paused ([#&#8203;1785](https://github.com/androidx/media/pull/1785)). - Add option to `ClippingMediaSource` to allow clipping in unseekable media. - Fix bug where seeking with pre-warming could block following media item transition. - Fix a bug where `ExoPlayer.isLoading()` remains `true` while it has transitioned to `STATE_IDLE` or `STATE_ENDED` ([#&#8203;2133](https://github.com/androidx/media/issues/2133)). - Add `lastRebufferRealtimeMs` to `LoadControl.Parameter` ([#&#8203;2113](https://github.com/androidx/media/pull/2113)). - Transformer: - Add support for transmuxing into alternative backward compatible formats. - Add support for transcoding and transmuxing Dolby Vision (profile 8) format. - Update parameters of `VideoFrameProcessor.registerInputStream` and `VideoFrameProcessor.Listener.onInputStreamRegistered` to use `Format`. - Generate HDR static metadata when using `DefaultEncoderFactory`. - Enable support for Android platform diagnostics using `MediaMetricsManager`. Transformer forwards editing events and performance data to the platform, which helps to provide system performance and debugging information on the device. This data may also be collected by Google [if sharing usage and diagnostics data is enabled](https://support.google.com/accounts/answer/6078260) by the user of the device. Apps can opt-out of contributing to platform diagnostics for Transformer with `Transformer.Builder.setUsePlatformDiagnostics(false)`. - Split `InAppMuxer` into `InAppMp4Muxer` and `InAppFragmentedMp4Muxer`. You use `InAppMp4Muxer` to produce a non-fragmented MP4 file, while `InAppFragmentedMp4Muxer` is for producing a fragmented MP4 file. - Move `Muxer` interface from `media3-muxer` to `media3-transformer`. - Add `MediaProjectionAssetLoader`, which provides media from a `MediaProjection` for screen recording, and add support for screen recording to the Transformer demo app. - Add `#getInputFormat()` to `Codec` interface. - Shift the responsibility to release the `GlObjectsProvider` onto the caller in `DefaultVideoFrameProcessor` and `DefaultVideoCompositor` when possible. - Extractors: - AVI: Fix handling of files with constant bitrate compressed audio where the stream header stores the number of bytes instead of the number of chunks. - Fix handling of NAL units with lengths expressed in 1 or 2 bytes (rather than 4). - Fix `ArrayIndexOutOfBoundsException` in MP4 edit lists when the edit list starts at a non-sync frame with no preceding sync frame ([#&#8203;2062](https://github.com/androidx/media/issues/2062)). - Fix issue where TS streams can get stuck on some devices ([#&#8203;2069](https://github.com/androidx/media/issues/2069)). - FLAC: Add support for 32-bit FLAC files. Previously these would fail to play with `IllegalStateException: Playback stuck buffering and not loading` ([#&#8203;2197](https://github.com/androidx/media/issues/2197)). - Audio: - Fix `onAudioPositionAdvancing` to be called when playback resumes (previously it was called when playback was paused). - Don't bypass `SonicAudioProcessor` when `SpeedChangingAudioProcessor` is configured with default parameters. - Fix underflow in `Sonic#getOutputSize()` that could cause `DefaultAudioSink` to stall. - Fix `MediaCodecAudioRenderer.getDurationToProgressUs()` and `DecoderAudioRenderer.getDurationToProgressUs()` so that seeks correctly reset the provided durations. - Make `androidx.media3.common.audio.SonicAudioProcessor` final. - Add support for float PCM to `ChannelMappingAudioProcessor` and `TrimmingAudioProcessor`. - Video: - Change `MediaCodecVideoRenderer.shouldUsePlaceholderSurface` to protected so that applications can override to block usage of placeholder surfaces ([#&#8203;1905](https://github.com/androidx/media/pull/1905)). - Add experimental `ExoPlayer` AV1 sample dependency parsing to speed up seeking. Enable it with the new `DefaultRenderersFactory.experimentalSetParseAv1SampleDependencies` API. - Add experimental `ExoPlayer` API to drop late `MediaCodecVideoRenderer` decoder input buffers that are not depended on. Enable it with `DefaultRenderersFactory.experimentalSetLateThresholdToDropDecoderInputUs`. - Fix issue where a player without a surface was ready immediately and very slow decoding any pending frames ([#&#8203;1973](https://github.com/androidx/media/issues/1973)). - Exclude Xiaomi and OPPO devices from detached surface mode to avoid screen flickering ([#&#8203;2059](https://github.com/androidx/media/issues/2059)). - Text: - Add support for VobSub subtitles ([#&#8203;8260](https://github.com/google/ExoPlayer/issues/8260)). - Stop eagerly loading all subtitle files configured with `MediaItem.Builder.setSubtitleConfigurations`, and instead only load one if it is selected by track selection ([#&#8203;1721](https://github.com/androidx/media/issues/1721)). - TTML: Add support for referencing `tts:origin` and `tts:extent` using `style` ([#&#8203;2953](https://github.com/google/ExoPlayer/issues/2953)). - Restrict WebVTT and SubRip timestamps to exactly 3 decimal places. Previously we incorrectly parsed any number of decimal places but always assumed the value was in milliseconds, leading to incorrect timestamps ([#&#8203;1997](https://github.com/androidx/media/issues/1997)). - Fix playback hanging when a playlist contains clipped items with CEA-608 or CEA-708 captions. - Fix `IllegalStateException` when an SSA file contains a cue with zero duration (start and end time equal) ([#&#8203;2052](https://github.com/androidx/media/issues/2052)). - Suppress (and log) subtitle parsing errors when subtitles are muxed into the same container as audio and video ([#&#8203;2052](https://github.com/androidx/media/issues/2052)). - Fix handling of multi-byte UTF-8 characters in WebVTT files using CR line endings ([#&#8203;2167](https://github.com/androidx/media/issues/2167)). - DRM: - Fix `MediaCodec$CryptoException: Operation not supported in this configuration` error when playing ClearKey content on API below 27 ([#&#8203;1732](https://github.com/androidx/media/issues/1732)). - Effect: - Moved the functionality of `OverlaySettings` into `StaticOverlaySettings`. `OverlaySettings` can be subclassed to allow dynamic overlay settings. - Muxers: - Moved `MuxerException` out of `Muxer` interface to avoid a very long fully qualified name. - Renamed `setSampleCopyEnabled()` method to `setSampleCopyingEnabled()` in both `Mp4Muxer.Builder` and `FragmentedMp4Muxer.Builder`. - `Mp4Muxer.addTrack()` and `FragmentedMp4Muxer.addTrack()` now return an `int` track ID instead of a `TrackToken`. - `Mp4Muxer` and `FragmentedMp4Muxer` no longer implement `Muxer` interface. - Disable `Mp4Muxer` sample batching and copying by default. - Fix a bug in `FragmentedMp4Muxer` that creates a lot of fragments when only audio track is written. - Session: - Keep foreground service state for an additional 10 minutes when playback pauses, stops or fails. This allows users to resume playback within this timeout without risking foreground service restrictions on various devices. Note that simply calling `player.pause()` can no longer be used to stop the foreground service before `stopSelf()` when overriding `onTaskRemoved`, use `MediaSessionService.pauseAllPlayersAndStopSelf()` instead. - Keep notification visible when playback enters an error or stopped state. The notification is only removed if the playlist is cleared or the player is released. - Improve handling of Android platform MediaSession actions ACTION\_PLAY and ACTION\_PAUSE to only set one of them according to the available commands and also accept if only one of them is set. - Add `Context` as a parameter to `MediaButtonReceiver.shouldStartForegroundService` ([#&#8203;1887](https://github.com/androidx/media/issues/1887)). - Fix bug where calling a `Player` method on a `MediaController` connected to a legacy session dropped changes from a pending update. - Make `MediaSession.setSessionActivity(PendingIntent)` accept null ([#&#8203;2109](https://github.com/androidx/media/issues/2109)). - Fix bug where a stale notification stays visible when the playlist is cleared ([#&#8203;2211](https://github.com/androidx/media/issues/2211)). - UI: - Add state holders and composables to the `media3-ui-compose` module for `PlayerSurface`, `PresentationState`, `PlayPauseButtonState`, `NextButtonState`, `PreviousButtonState`, `RepeatButtonState`, `ShuffleButtonState` and `PlaybackSpeedState`. - Downloads: - Fix bug in `CacheWriter` that leaves data sources open and cache areas locked in case the data source throws an `Exception` other than `IOException` ([#&#8203;9760](https://github.com/google/ExoPlayer/issues/9760)). - HLS extension: - Add a first version of `HlsInterstitialsAdsLoader`. The ads loader reads the HLS interstitials of an HLS media playlist and maps them to the `AdPlaybackState` that is passed to the `AdsMediaSource`. This initial version only supports HLS VOD streams with `X-ASSET-URI` attributes. - Add `HlsInterstitialsAdsLoader.AdsMediaSourceFactory`. Apps can use it to create `AdsMediaSource` instances that use an `HlsInterstitialsAdsLoader` in a convenient and safe way. - Parse `SUPPLEMENTAL-CODECS` tag from HLS playlist to detect Dolby Vision formats ([#&#8203;1785](https://github.com/androidx/media/pull/1785)). - Loosen the condition for seeking to sync positions in an HLS stream ([#&#8203;2209](https://github.com/androidx/media/issues/2209)). - DASH extension: - Add AC-4 Level-4 format support for DASH ([#&#8203;1898](https://github.com/androidx/media/pull/1898)). - Fix issue when calculating the update interval for ad insertion in multi-period live streams ([#&#8203;1698](https://github.com/androidx/media/issues/1698)). - Parse `scte214:supplementalCodecs` attribute from DASH manifest to detect Dolby Vision formats ([#&#8203;1785](https://github.com/androidx/media/pull/1785)). - Improve handling of period transitions in live streams where the period contains media samples beyond the declared period duration ([#&#8203;1698](https://github.com/androidx/media/issues/1698)). - Fix issue where adaptation sets marked with `adaptation-set-switching` but different languages or role flags are merged together ([#&#8203;2222](https://github.com/androidx/media/issues/2222)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - Add the MPEG-H decoder module which uses the native MPEG-H decoder module to decode MPEG-H audio ([#&#8203;1826](https://github.com/androidx/media/pull/1826)). - MIDI extension: - Plumb custom `AudioSink` and `AudioRendererEventListener` instances into `MidiRenderer`. - Cast extension: - Bump the `play-services-cast-framework` dependency to 21.5.0 to fix a `FLAG_MUTABLE` crash in apps targeting API 34+ on devices with Google Play services installed but disabled ([#&#8203;2178](https://github.com/androidx/media/issues/2178)). - Demo app: - Extend `demo-compose` with additional buttons and enhance `PlayerSurface` integration with scaling and shutter support. - Remove deprecated symbols: - Remove deprecated `AudioMixer.create()` method. Use `DefaultAudioMixer.Factory().create()` instead. - Remove the following deprecated `Transformer.Builder` methods: - `setTransformationRequest()`, use `setAudioMimeType()`, `setVideoMimeType()`, and `setHdrMode()` instead. - `setAudioProcessors()`, set the audio processor in an `EditedMediaItem.Builder.setEffects()`, and pass it to `Transformer.start()` instead. - `setVideoEffects()`, set video effect in an `EditedMediaItem.Builder.setEffects()`, and pass it to `Transformer.start()` instead. - `setRemoveAudio()`, use `EditedMediaItem.Builder.setRemoveAudio()` to remove the audio from the `EditedMediaItem` passed to `Transformer.start()` instead. - `setRemoveVideo()`, use `EditedMediaItem.Builder.setRemoveVideo()` to remove the video from the `EditedMediaItem` passed to `Transformer.start()` instead. - `setFlattenForSlowMotion()`, use `EditedMediaItem.Builder.setFlattenForSlowMotion()` to flatten the `EditedMediaItem` passed to `Transformer.start()` instead. - `setListener()`, use `addListener()`, `removeListener()` or `removeAllListeners()` instead. - Remove the following deprecated `Transformer.Listener` methods: - `onTransformationCompleted(MediaItem)`, use `onCompleted(Composition, ExportResult)` instead. - `onTransformationCompleted(MediaItem, TransformationResult)`, use `onCompleted(Composition, ExportResult)` instead. - `onTransformationError(MediaItem, Exception)`, use `onError(Composition, ExportResult, ExportException)` instead. - `onTransformationError(MediaItem, TransformationException)`, use `onError(Composition, ExportResult, ExportException)` instead. - `onTransformationError(MediaItem, TransformationResult, TransformationException)`, use `onError(Composition, ExportResult, ExportException)` instead. - `onFallbackApplied(MediaItem, TransformationRequest, TransformationRequest)`, use `onFallbackApplied(Composition, TransformationRequest, TransformationRequest)` instead. - Remove deprecated `TransformationResult` class. Use `ExportResult` instead. - Remove deprecated `TransformationException` class. Use `ExportException` instead. - Remove deprecated `Transformer.PROGRESS_STATE_NO_TRANSFORMATION`. Use `Transformer.PROGRESS_STATE_NOT_STARTED` instead. - Remove deprecated `Transformer.setListener()`. Use `Transformer.addListener()`, `Transformer.removeListener()` or `Transformer.removeAllListeners()` instead. - Remove deprecated `Transformer.startTransformation()`. Use `Transformer.start(MediaItem, String)` instead. - Remove deprecated `SingleFrameGlShaderProgram`. Use `BaseGlShaderProgram` instead. - Remove `Transformer.flattenForSlowMotion`. Use `EditedMediaItem.flattenForSlowMotion` instead. - Removed `ExoPlayer.VideoComponent`, `ExoPlayer.AudioComponent`, `ExoPlayer.TextComponent` and `ExoPlayer.DeviceComponent`. - Removed `androidx.media3.exoplayer.audio.SonicAudioProcessor`. - Removed the following deprecated `DownloadHelper` methods: - Constructor `DownloadHelper(MediaItem, @&#8203;Nullable MediaSource, TrackSelectionParameters, RendererCapabilities[])`, use `DownloadHelper(MediaItem, @&#8203;Nullable MediaSource, TrackSelectionParameters, RendererCapabilitiesList)` instead. - `getRendererCapabilities(RenderersFactory)`, equivalent functionality can be achieved by creating a `DefaultRendererCapabilitiesList` with a `RenderersFactory`, and calling `DefaultRendererCapabilitiesList.getRendererCapabilities()`. - Removed `PlayerNotificationManager.setMediaSessionToken(MediaSessionCompat)` method. Use `PlayerNotificationManager.setMediaSessionToken(MediaSession.Token)` and pass in `(MediaSession.Token) compatToken.getToken()` instead. ### [`v1.5.1`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#151-2024-12-19) [Compare Source](https://github.com/androidx/media/compare/1.5.0...1.5.1) This release includes the following changes since the [1.5.0 release](#&#8203;150-2024-11-27): - ExoPlayer: - Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API ([#&#8203;1641](https://github.com/androidx/media/issues/1641)). - Extractors: - MP3: Don't stop playback early when a `VBRI` frame's table of contents doesn't cover all the MP3 data in a file ([#&#8203;1904](https://github.com/androidx/media/issues/1904)). - Video: - Rollback of using `MediaCodecAdapter` supplied pixel aspect ratio values when provided while processing `onOutputFormatChanged` ([#&#8203;1371](https://github.com/androidx/media/pull/1371)). - Text: - Fix bug in `ReplacingCuesResolver.discardCuesBeforeTimeUs` where the cue active at `timeUs` (started before but not yet ended) was incorrectly discarded ([#&#8203;1939](https://github.com/androidx/media/issues/1939)). - Metadata: - Extract disc/track numbering and genre from Vorbis comments into `MediaMetadata` ([#&#8203;1958](https://github.com/androidx/media/issues/1958)). ### [`v1.5.0`](https://github.com/androidx/media/blob/HEAD/RELEASENOTES.md#150-2024-11-27) [Compare Source](https://github.com/androidx/media/compare/1.4.1...1.5.0) This release includes the following changes since the [1.4.1 release](#&#8203;141-2024-08-23): - Common Library: - Add `ForwardingSimpleBasePlayer` that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling ([#&#8203;1183](https://github.com/androidx/media/issues/1183)). - Replace `SimpleBasePlayer.State.playlist` by `getPlaylist()` method. - Add override for `SimpleBasePlayer.State.Builder.setPlaylist()` to directly specify a `Timeline` and current `Tracks` and `Metadata` instead of building a playlist structure. - Increase `minSdk` to 21 (Android Lollipop). This is aligned with all other AndroidX libraries. - Add `androidx.media3:media3-common-ktx` artifact which provides Kotlin-specific functionality built on top of the Common library - Add `Player.listen` suspending extension function to spin a coroutine to listen to `Player.Events` to the `media3-common-ktx` library. - Remove `@DoNotInline` annotations from manually out-of-lined inner classes designed to avoid [runtime class verification failures](https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md). Recent versions of [R8](https://developer.android.com/build/shrink-code) now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, [due to `compileSdk = 35`](https://issuetracker.google.com/345472586#comment7). Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has [already been done in other AndroidX libraries](http://r.android.com/3156141). - ExoPlayer: - `MediaCodecRenderer.onProcessedStreamChange()` can now be called for every media item. Previously it was not called for the first one. Use `MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()` to enable this. - Add `PreloadMediaSource.PreloadControl.onPreloadError` to allow `PreloadMediaSource.PreloadControl` implementations to take actions when error occurs. - Add `BasePreloadManager.Listener` to propagate preload events to apps. - Allow changing SNTP client timeout and retry alternative addresses on timeout ([#&#8203;1540](https://github.com/androidx/media/issues/1540)). - Remove `MediaCodecAdapter.Configuration.flags` as the field was always zero. - Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this). - Defer the blocking call to `Context.getSystemService(Context.AUDIO_SERVICE)` until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled ([#&#8203;1616](https://github.com/androidx/media/pull/1616)). - Allow playback regardless of buffered duration when loading fails ([#&#8203;1571](https://github.com/androidx/media/issues/1571)). - Add `AnalyticsListener.onRendererReadyChanged()` to signal when individual renderers allow playback to be ready. - Fix `MediaCodec.CryptoException` sometimes being reported as an "unexpected runtime error" when `MediaCodec` is operated in asynchronous mode (default behaviour on API 31+). - Pass `bufferedDurationUs` instead of `bufferedPositionUs` with `PreloadMediaSource.PreloadControl.onContinueLoadingRequested()`. Also changes `DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS` to `DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS`, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position. - Add `ForwardingRenderer` implementation that forwards all method calls to another renderer ([1703](https://github.com/androidx/media/pull/1703)). - Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling `ExoPlayer.setPreloadConfiguration(PreloadConfiguration)` accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, `DefaultLoadControl` restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing `LoadControl.shouldContinuePreloading()` accordingly (like when overriding this method in `DefaultLoadControl`). The default implementation of `LoadControl` disables preloading in case an app is using a custom implementation of `LoadControl`. - Add method `MediaSourceEventListener.EventDispatcher.dispatchEvent()` to allow invoking events of subclass listeners ([1736](https://github.com/androidx/media/pull/1736)). - Add `DefaultPreloadManager.Builder` that builds the `DefaultPreloadManager` and `ExoPlayer` instances with consistently shared configurations. - Remove `Renderer[]` parameter from `LoadControl.onTracksSelected()` as `DefaultLoadControl` implementation can retrieve the stream types from `ExoTrackSelection[]`. - Deprecated `DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])` and marked method as final to prevent overrides. The new `DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])` should be used instead. - Report `MediaSourceEventListener` events from secondary sources in `MergingMediaSource`. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with `MediaItem.LocalConfiguration.subtitleConfigurations`), which may appear as duplicate load events emitted from `AnalyticsListener`. - Prevent subtitle & metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues ([#&#8203;1722](https://github.com/google/ExoPlayer/issues/1722)). - In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via `onLoadError` callbacks. - In legacy subtitle handling (during rendering), only associated load errors are emitted via `onLoadError` callbacks while parse errors are silently ignored (this is pre-existing behaviour). - Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item ([#&#8203;1698](https://github.com/androidx/media/issues/1698)). - Add a setter to `SntpClient` to set the max elapsed time since the last update after which the client is re-initialized ([#&#8203;1794](https://github.com/androidx/media/pull/1794)). - Transformer: - Add `SurfaceAssetLoader`, which supports queueing video data to Transformer via a `Surface`. - `ImageAssetLoader` reports unsupported input via `AssetLoader.onError` instead of throwing an `IllegalStateException`. - Make setting the image duration using `MediaItem.Builder.setImageDurationMs` mandatory for image export. - Add export support for gaps in sequences of audio EditedMediaItems. - Track Selection: - `DefaultTrackSelector`: Prefer object-based audio over channel-based audio when other factors are equal. - Extractors: - Allow `Mp4Extractor` and `FragmentedMp4Extractor` to identify H264 samples that are not used as reference by subsequent samples. - Add option to enable index-based seeking in `AmrExtractor`. - Treat MP3 files with more than 128kB between valid frames as truncated (instead of invalid). This means files with non-MP3 data at the end, with no other metadata to indicate the length of the MP3 bytes, now stop playback at the end of the MP3 data instead of failing with `ParserException: Searched too many bytes.{contentIsMalformed=true, dataType=1}` ([#&#8203;1563](https://github.com/androidx/media/issues/1563)). - Fix preroll sample handling for non-keyframe media start positions when processing edit lists in MP4 files ([#&#8203;1659](https://github.com/google/ExoPlayer/issues/1659)). - Improved frame rate calculation by using media duration from the `mdhd` box in `Mp4Extractor` and `FragmentedMp4Extractor` ([#&#8203;1531](https://github.com/androidx/media/issues/1531)). - Fix incorrect scaling of `media_time` in MP4 edit lists. While `segment_duration` was already correctly scaled using the movie timescale, `media_time` is now properly scaled using the track timescale, as specified by the MP4 format standard ([#&#8203;1792](https://github.com/androidx/media/issues/1792)). - Handle out-of-order frames in `endIndices` calculation for MP4 with edit list ([#&#8203;1797](https://github.com/androidx/media/issues/1797)). - Fix media duration parsing in `mdhd` box of MP4 files to handle `-1` values ([#&#8203;1819](https://github.com/androidx/media/issues/1819)). - Add support for identifying `h263` box in MP4 files for H.263 video ([#&#8203;1821](https://github.com/androidx/media/issues/1821)). - Add AC-4 Level-4 ISO base media file format support ([#&#8203;1265](https://github.com/androidx/media/pull/1265)). - DataSource: - Update `HttpEngineDataSource` to allow use starting at version S extension 7 instead of API level 34 ([#&#8203;1262](https://github.com/androidx/media/issues/1262)). - `DataSourceContractTest`: Assert that `DataSource.getUri()` returns the resolved URI (as documented). Where this is different to the requested URI, tests can indicate this using the new `DataSourceContractTest.TestResource.Builder.setResolvedUri()` method. - `DataSourceContractTest`: Assert that `DataSource.getUri()` and `getResponseHeaders()` return their 'open' value after a failed call to `open()` (due to a 'not found' resource) and before a subsequent `close()` call. - Overriding `DataSourceContractTest.getNotFoundResources()` allows test sub-classes to provide multiple 'not found' resources, and to provide any expected headers too. This allows to distinguish between HTTP 404 (with headers) and "server not found" (no headers). - Audio: - Automatically configure CTA-2075 loudness metadata on the codec if present in the media. - Ensure smooth volume ramp down when seeking. - Fix pop sounds that may occur during seeks. - Fix truncation error accumulation for Sonic's time-stretching/pitch-shifting algorithm. - Fix bug in `SpeedChangingAudioProcessor` that causes dropped output frames. - Video: - `MediaCodecVideoRenderer` avoids decoding samples that are neither rendered nor used as reference by other samples. - On API 35 and above, `MediaCodecAdapter` may now receive a `null` `Surface` in `configure` and calls to a new method `detachOutputSurface` to remove a previously set `Surface` if the codec supports this (`MediaCodecInfo.detachedSurfaceSupported`). - Use `MediaCodecAdapter` supplied pixel aspect ratio values if provided when processing `onOutputFormatChanged` ([#&#8203;1371](https://github.com/androidx/media/pull/1371)). - Add workaround for a device issue on Galaxy Tab S7 FE that causes 60fps secure H264 streams to be marked as unsupported ([#&#8203;1619](https://github.com/androidx/media/issues/1619)). - Add workaround for codecs that get stuck after the last sample without returning an end-of-stream signal. - Text: - Add a custom `VoiceSpan` and populate it for [WebVTT voice spans](https://www.w3.org/TR/webvtt1/#webvtt-cue-voice-span) ([#&#8203;1632](https://github.com/androidx/media/issues/1632)). - Ensure WebVTT in HLS with very large subtitle timestamps (which overflow a 64-bit `long` when represented as microseconds and multiplied by the `90,000` MPEG timebase) are displayed ([#&#8203;1763](https://github.com/androidx/media/issues/1763)). - Support CEA-608 subtitles in Dolby Vision content ([#&#8203;1820](https://github.com/androidx/media/issues/1820)). - Fix playback hanging on DASH multi-period streams when CEA-608 subtitles are enabled ([#&#8203;1863](https://github.com/androidx/media/issues/1863)). - Metadata: - Assign the `C.TRACK_TYPE_METADATA` type to tracks containing icy or vnd.dvb.ait content. - Image: - Add `ExternallyLoadedImageDecoder` for simplified integration with external image loading libraries like Glide or Coil. - DataSource: - Add `FileDescriptorDataSource`, a new `DataSource` that can be used to read from a `FileDescriptor` ([#&#8203;3757](https://github.com/google/ExoPlayer/issues/3757)). - Effect: - Add `DefaultVideoFrameProcessor` workaround for minor `SurfaceTexture` scaling. `SurfaceTexture` may include a small scaling that cuts off a 1-texel border around the edge of a cropped buffer. This is now handled such that output is closer to expected. - Speed up `DefaultVideoFrameProcessor.queueInputBitmap()`. As a result, exporting images to videos with `Transformer` is faster. - IMA extension: - Fix bug where clearing the playlist may cause an `ArrayIndexOutOfBoundsException` in `ImaServerSideAdInsertionMediaSource`. - Fix bug where server-side inserted DAI streams without a preroll can result in an `ArrayIndexOutOfBoundsException` when playing past the last midroll ([#&#8203;1741](https://github.com/androidx/media/issues/1741)). - Session: - Add `MediaButtonReceiver.shouldStartForegroundService(Intent)` to allow apps to suppress a play command coming in for playback resumption by overriding this method. By default, the service is always started and playback can't be suppressed without the system crashing the service with a `ForegroundServiceDidNotStartInTimeException` ([#&#8203;1528](https://github.com/google/ExoPlayer/issues/1528)). - Fix bug that caused custom commands sent from a `MediaBrowser` being dispatched to the `MediaSessionCompat.Callback` instead of the `MediaBrowserServiceCompat` variant of the method when connected to a legacy service. This prevented the `MediaBrowser` to receive the actual return value sent back by the legacy service ([#&#8203;1474](https://github.com/androidx/media/issues/1474)). - Handle `IllegalArgumentException` thrown by devices of certain manufacturers when setting the broadcast receiver for media button intents ([#&#8203;1730](https://github.com/androidx/media/issues/1730)). - Add command buttons for media items. This adds the Media3 API for what was known as `Custom browse actions` with the legacy library with `MediaBrowserCompat`. Note that with Media3 command buttons for media items are available for both, `MediaBrowser` and `MediaController`. See [Custom Browse actions of AAOS](https://developer.android.com/training/cars/media#custom_browse_actions). - Fix bug where a Media3 controller was sometimes unable to let a session app start a foreground service after requesting `play()`. - Restrict `CommandButton.Builder.setIconUri` to only accept content Uris. - Pass connection hints of a Media3 browser to the initial `MediaBrowserCompat` when connecting to a legacy `MediaBrowserCompat`. The service can receive the connection hints passed in as root hints with the first call to `onGetRoot()`. - Fix bug where a `MediaBrowser` connected to a legacy browser service, didn't receive an error sent by the service after the browser has subscribed to a `parentid`. - Improve interoperability behavior, so that a Media3 browser that is connected to a legacy `MediaBrowserService` doesn't request the children of a `parentId` twice when subscribing to a parent. - UI: - Make the stretched/cropped video in `PlayerView`-in-Compose-`AndroidView` workaround opt-in, due to issues with XML-based shared transitions. Apps using `PlayerView` inside `AndroidView` need to call `PlayerView.setEnableComposeSurfaceSyncWorkaround` in order to opt-in ([#&#8203;1237](https://github.com/androidx/media/issues/1237), [#&#8203;1594](https://github.com/androidx/media/issues/1594)). - Add `setFullscreenButtonState` to `PlayerView` to allow updates of fullscreen button's icon on demand, i.e. out-of-band and not reactively to a click interaction ([#&#8203;1590](https://github.com/androidx/media/issues/1590), [#&#8203;184](https://github.com/androidx/media/issues/184)). - Fix bug where the "None" choice in the text selection is not working if there are app-defined text track selection preferences. - DASH extension: - Add support for periods starting in the middle of a segment ([#&#8203;1440](https://github.com/androidx/media/issues/1440)). - Smooth Streaming extension: - Fix a `Bad magic number for Bundle` error when playing SmoothStreaming streams with text tracks ([#&#8203;1779](https://github.com/androidx/media/issues/1779)). - RTSP extension: - Fix user info removal for URLs that contain encoded @&#8203; characters ([#&#8203;1138](https://github.com/androidx/media/pull/1138)). - Fix crashing when parsing of RTP packets with header extensions ([#&#8203;1225](https://github.com/androidx/media/pull/1225)). - Decoder extensions (FFmpeg, VP9, AV1, etc.): - Add the IAMF decoder module, which provides support for playback of MP4 files containing IAMF tracks using the libiamf native library to synthesize audio. - Playback is enabled with a stereo layout as well as 5.1 with spatialization together with optional head tracking enabled, but binaural playback support is currently not available. - Add 16 KB page support for decoder extensions on Android 15 ([#&#8203;1685](https://github.com/androidx/media/issues/1685)). - Cast extension: - Stop cleaning the timeline after the CastSession disconnects, which enables the sender app to resume playback locally after a disconnection. - Populate CastPlayer's `DeviceInfo` when a `Context` is provided. This enables linking the `MediaSession` to a `RoutingSession`, which is necessary for integrating Output Switcher ([#&#8203;1056](https://github.com/androidx/media/issues/1056)). - Test Utilities: - `DataSourceContractTest` now includes tests to verify: - Input stream `read position` is updated. - Output buffer `offset` is applied correctly. - Demo app - Resolve the memory leaks in demo short-form app ([#&#8203;1839](https://github.com/androidx/media/issues/1839)). - Remove deprecated symbols: - Remove deprecated `Player.hasPrevious`, `Player.hasPreviousWindow()`. Use `Player.hasPreviousMediaItem()` instead. - Remove deprecated `Player.previous()`method. Use `Player.seekToPreviousMediaItem()` instead. - Remove deprecated `DrmSessionEventListener.onDrmSessionAcquired` method. - Remove deprecated `DefaultEncoderFactory` constructors. Use `DefaultEncoderFactory.Builder` instead. </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMzEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjIzMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
renovate added 1 commit 2026-07-05 23:52:06 -07:00
Update dependency androidx.media3:media3-exoplayer to v1.10.1
Some checks failed
gitleaks / scan (push) Failing after 1s
gitleaks / scan (pull_request) Failing after 1s
6c969f2dc4
Some checks failed
gitleaks / scan (push) Failing after 1s
gitleaks / scan (pull_request) Failing after 1s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/androidx.media3-media3-exoplayer-1.x:renovate/androidx.media3-media3-exoplayer-1.x
git checkout renovate/androidx.media3-media3-exoplayer-1.x
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Sulkta-OSS/straw#27
No description provided.