1.5.0-alpha01
Pre-release
Pre-release
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
bygetPlaylist()
method. - Add override for
SimpleBasePlayer.State.Builder.setPlaylist()
to directly specify aTimeline
and currentTracks
andMetadata
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 toPlayer.Events
to themedia3-common-ktx
library.
- Add
- ExoPlayer:
MediaCodecRenderer.onProcessedStreamChange()
can now be called for every media item. Previously it was not called for the first one. UseMediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()
to enable this.- Add
PreloadMediaSource.PreloadControl.onPreloadError
to allowPreloadMediaSource.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 aSurface
. ImageAssetLoader
reports unsupported input viaAssetLoader.onError
instead of throwing anIllegalStateException
.
- Add
- Extractors:
- Allow
Mp4Extractor
andFragmentedMp4Extractor
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).
- Allow
- DataSource:
- Update
HttpEngineDataSource
to allow use starting at version S extension 7 instead of API level 34 (#1262).
- Update
- 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 anull
Surface
inconfigure
and calls to a new methoddetachOutputSurface
to remove a previously setSurface
if the codec supports this (MediaCodecInfo.detachedSurfaceSupported
). - Use
MediaCodecAdapter
supplied pixel aspect ratio values if provided when processingonOutputFormatChanged
(#1371).
- Text:
- Add a custom
VoiceSpan
and populate it for WebVTT voice spans (#1632).
- Add a custom
- Image:
- Add
ExternallyLoadedImageDecoder
for simplified integration with external image loading libraries like Glide or Coil.
- Add
- DataSource:
- Add
FileDescriptorDataSource
, a newDataSource
that can be used to read from aFileDescriptor
(#3757).
- Add
- Effect:
- Add
DefaultVideoFrameProcessor
workaround for minorSurfaceTexture
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 withTransformer
is faster.
- Add
- IMA extension:
- Fix bug where clearing the playlist may cause an
ArrayIndexOutOfBoundsException
inImaServerSideAdInsertionMediaSource
.
- Fix bug where clearing the playlist may cause an
- 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 aForegroundServiceDidNotStartInTimeException
(#1528).
- Add
- 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.
- Add the IAMF decoder module, which provides support for playback of MP4 files containing IAMF tracks using the libiamf native library to synthesize audio.
- 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 aContext
is provided. This enables linking theMediaSession
to aRoutingSession
, 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.
- Input stream
- Remove deprecated symbols:
- Remove deprecated
Player.hasPrevious
,Player.hasPreviousWindow()
. UsePlayer.hasPreviousMediaItem()
instead. - Remove deprecated
Player.previous()
method. UsePlayer.seekToPreviousMediaItem()
instead. - Remove deprecated
DrmSessionEventListener.onDrmSessionAcquired
method.
- Remove deprecated