1.4.0-alpha02
Pre-release
Pre-release
tianyif
released this
07 Jun 12:10
·
683 commits
to release
since this release
This release includes the following changes since the 1.4.0-alpha01 release:
- Common Library:
- Forward presumed no-op seek calls to the protected
BasePlayer.seekTo
andSimpleBasePlayer.handleSeek
methods instead of ignoring them. If you are implementing these methods in a custom player, you may need to handle these additional calls withmediaItemIndex == C.INDEX_UNSET
. - Remove compile dependency on enhanced Java 8 desugaring (#1312).
- Ensure the duration passed to
MediaItem.Builder.setImageDurationMs
is ignored for a non-imageMediaItem
(as documented).
- Forward presumed no-op seek calls to the protected
- ExoPlayer:
- Add
reset
toBasePreloadManager
to release all the holding sources while keep the preload manager instance. - Add
ExoPlayer.setPriority
(andBuilder.setPriority
) to define the priority value used inPriorityTaskManager
and for MediaCodec importance from API 35. - Fix issue with updating the last rebuffer time which resulted in incorrect
bs
(buffer starvation) key in CMCD (#1124). - Add
PreloadMediaSource.PreloadControl.onLoadedToTheEndOfSource(PreloadMediaSource)
to indicate that the source has loaded to the end. This allows theDefaultPreloadManager
and the customPreloadMediaSource.PreloadControl
implementations to preload the next source or take other actions. - Fix bug where silence skipping at the end of items can trigger a playback exception.
- Add
clear
toPreloadMediaSource
to discard the preloading period. - Add new error code
PlaybackException.ERROR_CODE_DECODING_RESOURCES_RECLAIMED
that is used when codec resources are reclaimed for higher priority tasks. - Let
AdsMediaSource
load preroll ads before initial content media preparation completes (#1358). - Fix bug where playback moved to
STATE_ENDED
when re-preparing a multi-period DASH live stream after the original period was already removed from the manifest. - Rename
onTimelineRefreshed
toonSourcePrepared
andonPrepared
toonTracksSelected
inPreloadMediaSource.PreloadControl
. Also rename the IntDefs inDefaultPreloadManager.Stage
accordingly. - Add experimental support for dynamic scheduling to better align work with CPU wake-cycles and delay waking up to when renderers can progress. You can enable this using
experimentalSetDynamicSchedulingEnabled
when setting up your ExoPlayer instance. - Add
Renderer.getDurationToProgressMs
. ARenderer
can implement this method to return to ExoPlayer the duration that playback must advance for the renderer to progress. IfExoPlayer
is set withexperimentalSetDynamicSchedulingEnabled
thenExoPlayer
will call this method when calculating the time to schedule its work task. - Add
MediaCodecAdapter#OnBufferAvailableListener
to alert when input and output buffers are available for use byMediaCodecRenderer
.MediaCodecRenderer
will signalExoPlayer
when receiving these callbacks and ifExoPlayer
is set withexperimentalSetDynamicSchedulingEnabled
, thenExoPlayer
will schedule its work loop as renderers can make progress. - Use data class for
LoadControl
methods instead of individual parameters.
- Add
- Transformer:
- Work around a decoder bug where the number of audio channels was capped at stereo when handling PCM input.
- When selecting tracks in
ExoPlayerAssetLoader
, ignore audio channel count constraints as they only apply for playback. - Replace
androidx.media3.transformer.Muxer
interface withandroidx.media3.muxer.Muxer
and removeandroidx.media3.transformer.Muxer
. - Fix HEIC image loading from content URI schemes (#1373).
- Adjust audio track duration in
AudioGraphInput
to improve AV sync.
- Extractors:
- MPEG-TS: Roll forward the change ensuring the last frame is rendered by passing the last access unit of a stream to the sample queue (#7909). Incorporating fixes to resolve the issues that emerged in I-frame only HLS streams(#1150) and H.262 HLS streams (#1126).
- MP3: Prefer the data size from an
Info
frame over the size reported by the underlying stream (e.g. file size, or HTTPContent-Length
header). This helps to exclude non-playable trailer data (e.g. album artwork) from constant bitrate seeking calculations, making seeks more accurate (#1376). - MP3: Use the frame count and other data in an
Info
frame (if present) to compute an average bitrate for constant bitrate seeking, rather than extrapolating from the bitrate of the frame after theInfo
frame, which may be artificially small, e.g.PCUT
frame (#1376).
- Audio:
- Fix DTS:X Profile 2 encoding attributes for passthrough playback (#1299).
- For offloaded playback, reset the tracking field for stream completion in
DefaultAudioSink
prior to callingAudioTrack.stop()
so thatAudioTrack.StreamEventCallback#onPresentationEnded
correctly identifies when all pending data has been played. - Fix bug in
SilenceSkippingAudioProcessor
where transitions between different audio formats (for example stereo to mono) can cause the processor to throw an exception (#1352). - Implement
MediaCodecAudioRenderer.getDurationToProgressUs
so that ExoPlayer will dynamically schedule its main work loop to when the MediaCodecAudioRenderer can make progress.
- Video:
- Fix decoder fallback logic for Dolby Vision to use a compatible AV1 decoder if needed (#1389).
- Text:
- Fix issue where subtitles starting before a seek position are skipped. This issue was only introduced in Media3 1.4.0-alpha01.
- Change default subtitle parsing behavior so it happens during extraction instead of during rendering (see ExoPlayer's architecture diagram for the difference between extraction and rendering).
- This change can be overridden by calling both
MediaSource.Factory.experimentalParseSubtitlesDuringExtraction(false)
andTextRenderer.experimentalSetLegacyDecodingEnabled(true)
. See the docs on customization for how to plumb these components into anExoPlayer
instance. These methods (and all support for legacy subtitle decoding) will be removed in a future release. - Apps with custom
SubtitleDecoder
implementations need to update them to implementSubtitleParser
instead (andSubtitleParser.Factory
instead ofSubtitleDecoderFactory
).
- This change can be overridden by calling both
- PGS: Fix run-length decoding to resolve
0
as a color index, instead of a literal color value (#1367). - CEA-708: Ignore
rowLock
value. The CEA-708-E S-2023 spec states thatrowLock
andcolumnLock
should both be assumed to be true, regardless of the values present in the stream (columnLock
support is not implemented, so it's effectively assumed to always be false).- This was originally included in the
1.3.0-alpha01
release notes, but the change was accidentally reverted before the1.3.0-rc01
release. This is now fixed, so the change is present again.
- This was originally included in the
- CEA-708: Avoid duplicate newlines being added by ExoPlayer's naive handling of the 'set pen location' command (#1315).
- Metadata:
- Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort' (
soal
), 'artist sort' (soar
) and 'album artist sort' (soaa
) MP4 tags were wrongly mapped to theTSO2
,TSOA
andTSOP
ID3 tags (#1302). - Fix reading of MP4 (/iTunes) numeric
gnre
(genre) andtmpo
(tempo) tags when the value is more than one byte long. - Propagate ID3
TCON
frame toMediaMetadata.genre
(#1305).
- Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort' (
- Image:
- Add support for non-square DASH thumbnail grids (#1300).
- Add support for AVIF for API 34+.
- DataSource:
- Allow
ByteArrayDataSource
to resolve a URI to a byte array duringopen()
, instead of being hard-coded at construction (#1405).
- Allow
- DRM:
- Allow setting a
LoadErrorHandlingPolicy
onDefaultDrmSessionManagerProvider
(#1271).
- Allow setting a
- Effect:
- Fix bug where
TimestampWrapper
crashes when used withExoPlayer#setVideoEffects
(#821). - Change default SDR color working space from linear colors to electrical BT 709 SDR video. Also provide third option to retain the original colorspace.
- Allow defining indeterminate z-order of EditedMediaItemSequences (#1055).
- Maintain a consistent luminance range across different pieces of HDR content (uses the HLG range).
- Add support for Ultra HDR (bitmap) overlays on HDR content.
- Allow
SeparableConvolution
effects to be used before API 26.
- Fix bug where
- IMA extension:
- Promote API that is required for apps to play DAI ad streams to stable.
- Add
replaceAdTagParameters(Map <String, String>)
toImaServerSideAdInsertionMediaSource.AdLoader
that allows replacing ad tag parameters at runtime. - Fix bug where
VideoAdPlayer.VideoAdPlayerCallback.onError
was not called when a player error happened during ad playback (#1334). - Bump IMA SDK version to 3.33.0 to fix a
NullPointerException
when usingdata://
ad tag URIs (#700).
- Session:
- Hide seekbar in the media notification for live streams by not setting the duration into the platform session metadata (#1256).
- Align conversion of
MediaMetadata
toMediaDescriptionCompat
, to use the same preferred order and logic when selecting metadata properties as in media1. - Add
MediaSession.sendError()
that allows sending non-fatal errors to Media3 controller. When using the notification controller (seeMediaSession.getMediaNotificationControllerInfo()
), the custom error is used to update thePlaybackState
of the platform session to an error state with the given error information (#543).
- Cronet Extension:
- Fix
SocketTimeoutException
inCronetDataSource
. In some versions of Cronet, the request provided by the callback is not always the same. This leads to callback not completing and request timing out (https://issuetracker.google.com/328442628).
- Fix
- HLS Extension:
- Fix bug where pending EMSG samples waiting for a discontinuity were delegated in
HlsSampleStreamWrapper
with an incorrect offset causing anIndexOutOfBoundsException
or anIllegalArgumentException
(#1002). - Fix bug where non-primary playlists keep reloading for LL-HLS streams (#1240).
- Fix bug where enabling CMCD for HLS with initialization segments resulted in
Source Error
andIllegalArgumentException
.
- Fix bug where pending EMSG samples waiting for a discontinuity were delegated in
- DASH Extension:
- Cast Extension:
- Fix bug that converted the album title of the
MediaQueueItem
to the artist in the Media3 media item (#1255).
- Fix bug that converted the album title of the
- Demo app:
- Allow setting repeat mode with
Intent
arguments from command line (#1266).
- Allow setting repeat mode with
- Remove deprecated symbols:
- Remove
setContentTypePredicate(Predicate)
method fromDefaultHttpDataSource
,OkHttpDataSource
andCronetDataSource
. Use the equivalent method on eachXXXDataSource.Factory
instead. - Remove
OkHttpDataSource
constructors andOkHttpDataSourceFactory
. UseOkHttpDataSource.Factory
instead. - Remove
PlayerMessage.setHandler(Handler)
. UsesetLooper(Looper)
instead. - Remove
Timeline.Window.isLive
field. Use theisLive()
method instead. - Remove
DefaultHttpDataSource
constructors. UseDefaultHttpDataSource.Factory
instead. - Remove
DashMediaSource.DEFAULT_LIVE_PRESENTATION_DELAY_MS
. UseDashMediaSource.DEFAULT_FALLBACK_TARGET_LIVE_OFFSET_MS
instead. - Remove
MediaCodecInfo.isSeamlessAdaptationSupported(Format, Format, boolean)
. UseMediaCodecInfo.canReuseCodec(Format, Format)
instead. - Remove
DrmSessionManager.DUMMY
andgetDummyDrmSessionManager()
method. UseDrmSessionManager.DRM_UNSUPPORTED
instead. - Remove
AnalyticsListener.onAudioInputFormatChanged(EventTime, Format)
,AnalyticsListener.onVideoInputFormatChanged(EventTime, Format)
,AudioRendererEventListener.onAudioInputFormatChanged(Format)
,VideoRendererEventListener.onVideoInputFormatChanged(Format)
. Use the overloads that take aDecoderReuseEvaluation
instead. - Remove
RendererSupport.FormatSupport
IntDef andFORMAT_HANDLED
,FORMAT_EXCEEDS_CAPABILITIES
,FORMAT_UNSUPPORTED_DRM
,FORMAT_UNSUPPORTED_SUBTYPE
,FORMAT_UNSUPPORTED_TYPE
constants. Use the equivalent IntDef and constants inandroidx.media3.common.C
instead (e.g.C.FORMAT_HANDLED
).
- Remove