Skip to content

1.5.0-alpha01

Pre-release
Pre-release
Compare
Choose a tag to compare
@ivanbuper ivanbuper released this 10 Sep 13:55
· 590 commits to release since this release

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.
  • 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.
  • 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.
  • 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).
  • DataSource:
    • Update HttpEngineDataSource to allow use starting at version S extension 7 instead of API level 34 (#1262).
  • Audio:
    • Automatically configure CTA-2075 loudness metadata on the codec if present in the media.
    • Ensure smooth volume ramp down when seeking.
  • 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).
  • Text:
  • 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.
  • 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).
  • DASH Extension:
    • Add support for periods starting in the middle of a segment (#1440).
  • 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.
  • Cast Extension:
    • Stop clearning 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.
  • 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.