Update dependency androidx.media3:media3-exoplayer to v1.10.1 #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/androidx.media3-media3-exoplayer-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.4.1→1.10.1Release Notes
androidx/media (androidx.media3:media3-exoplayer)
v1.10.1Compare Source
This release includes the following changes since 1.10.0:
onAudioSessionIdChangedinSimpleBasePlayerandForwardingSimpleBasePlayer.lead to an
IllegalStateExceptionwith tunneling mode.(#3099).
renderer prewarming.
data when using an AV1-based Dolby Vision codec
(#3153).
VideoTrackInfoto resolve fallbackMIME types and move HDR and codec score preferences to quality
preferences (#3135).
length (#3117).
ArrayIndexOutOfBoundsExceptioninMp4ExtractorwhenFLAG_OMIT_TRACK_SAMPLE_TABLEis set and the track lacks a sync sample(
stss) box.are added to the player.
avoid codec resets where they are not beneficial
(#3120).
queueSecureInputBufferfor 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.
when the user "stops scrubbing"
(#2815).
ForegroundServiceStartNotAllowedExceptionwasn'tpropagated across thread boundaries in case the application thread is
not the main thread
(#2499).
COMMAND_SEEK_TO_MEDIA_ITEMis not available in aMediaControllerwhen connecting to a platform-only session thatsupports seeking to other items but no playlist modifications.
MediaControllercan't set media items on platformmedia sessions that don't allow
PREPARE_FROMactions.Controller.isTrusted()onAPI 27 or before when connecting via platform controllers.
ArrayIndexOutOfBoundsExceptionis thrown duringstream fallback if the track selection is a subset of the available
tracks (#3161).
across media playlist updates if the
#EXT-X-MAPtag was not repeatedin subsequent updates
(#3105).
SampleQueuewhen seeking into a chunk that is currentlybeing canceled.
v1.10.0Compare Source
This release includes the following changes since
1.9.1 release:
Player.mute()andPlayer.unmute()fromUnstableApitostable.
Format.pcmEncodingandC.PcmEncodingfromUnstableApitostable.
Format.primaryTrackGroupIdto identify the primary group ofembedded
Formatinstances(#294).
AdsMediaSource.MediaCodecVideoRenderertobetter align scheduling work and CPU wake-cycles to when video frames
can be processed. You can enable this using
experimentalSetEnableMediaCodecVideoRendererDurationToProgressUs()inthe
DefaultRenderersFactory.DataSource.FactoryinDefaultPreloadManager.Builder.ExoPlayerto be mocked without Robolectric by moving somedefault constants to
ExoPlayer.Builder. Mocking this complex interfaceis not generally encouraged - only when the usage is
minimal/simple/incidental
(#2985).
DEFAULT_STUCK_PLAYING_DETECTION_TIMEOUT_MSfrom
ExoPlayertoExoPlayer.Builder(without deprecation).ProgressiveMediaSourcepropagates out-of-date timelineinfo to the player, and the queued periods unexpectedly get removed
(#3016).
playback is requested during phone calls.
re-buffers at the end of the on-demand content
(#3052).
(#2830).
ArrayIndexOutOfBoundsException(#3125).
EditedMediaItem.removeVideo.EditedMediaItem.Builder.setFrameRate()can now set a maximum outputframe rate for video, which is particularly helpful when increasing
media speed with
setSpeed().DefaultTrackSelector.selectAllTracksto includethe output array as a parameter, pre-populated with track overrides.
whether the corresponding primary track is selected
(#294).
TrackSelectionParametersoptions forpreferredVideoLanguages,preferredVideoLabels,preferredAudioLabels,preferredTextLabelsandselectTextByDefault.uuidboxes before other boxes likemoov(#3046).containers.
FrameExtractor. Users should now depend on thenew
:media3-inspector-framemodule and update imports toandroidx.media3.inspector.frame.FrameExtractor.frames.
libiamftoiamf_tools.using the IAMF decoder extension) or through the Android Spatializer.
AC4Profile22and other legacy profileswhen assessing AC-4 decoder support in Automotive scenarios
(#2609).
AudioOutputinitialization inDefaultAudioSink(#2905).
applicable) when decoding IAMF, both with the IAMF extension and media
codec decoders, supported by new fields and logic in AudioCapabilities
and AudioCapabilitiesReceiver.
audio in compressed offload mode.
STARTandSTOPSPU control commands to derive cueduration instead of always defaulting to 5 seconds
(#2935).
potential metadata tracks published by HLS variants and renditions
(#3043).
LottieOverlayto a new:media3-effect-lottiemodule (which alsoinvolved renaming it from
androidx.media3.effect.LottieOverlaytoandroidx.media3.effect.lottie.LottieOverlay).:media3-effect-lottiemodule which providesfunctionality for applying lottie effects to video frames.
latest Ad media info API.
the IMA LOADED event. The fix now maps the ad MIME type using the ad
media info provided by IMA.
setEnableCustomTabstoImaAdsLoaderandImaServerSideAdInsertionMediaSource, allowing users to control whetherad click-through URLs are launched using Custom Tabs.
ImaAdTagUriBuilder, a class that offers an alternative way toconstruct an
adTagUri. It contains thesetPreferredLinearOrientationAPI. 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.
MediaMetadata.artworkDatacan crashthe app.
@Player.Commandargument in theActionFactoryinterface (#2933).
MediaSessionServiceandMediaLibraryServiceaLifecycleService, allowing to attach lifecycle-aware operations to theservice's lifecycle
(#187).
MediaControllerandMediaBrowserfor local playbacks. Apps shouldn't change the localdevice volume, and if required, can use
AudioManagerAPIs for thispurpose.
Intentinstances that started the service as a foregroundservice. This prevents a
ForegroundServiceDidNotStartInTimeExceptionbeing thrown by the system. This is a breaking change on an unstable API
for apps implementing a custom
MediaNotification.Provideras there isa new required method.
PendingIntentinstances to be used with home screenwidgets (#2933).
Intentinstances for Compose-basedhome screen widgets
(#2933).
when playback transitioned from a given media item index to another with
the same media item for discontinuity reason 'AUTO' and 'SEEK'
(#2997).
other UI surface like Android Auto or manufacturers not needing the
workaround (#3041).
(#3056).
particular size can crash SysUI and force the device to reboot
(#3118).
(#3084).
PlaybackSpeedControlComposable tomedia3-ui-composefordisplaying and modifying playback speed.
PlaybackSpeedToggleButtonComposable tomedia3-ui-compose-material3for controlling playback speed.ProgressSliderComposable tomedia3-ui-compose-material3fordisplaying player progress and performing seeks using dragging and
tapping (#2288).
PlayerComposable tomedia3-ui-compose-material3which combinesa
ContentFramewith customizable controls aligned to top, center, andbottom.
continuous announcement update when
PlayerControlViewis visible.(#2484).
QUERYPARAMattribute with#EXT-X-DEFINE(#1854).
(#3008).
(#3043).
streams from different locations are available
(#1988).
and resumption position
(#3013).
or missed samples at the beginning of playback
(#3057).
correctly (#3024).
parse samples of the same access unit that spanned multiple RTP packets.
This resulted in visual artifacts and corruption in the video
(#3121).
(#3066).
RemoteCastPlayer.Builder#setTrackSelectormethod that enables theimplementation of track selection for Cast playbacks.
ExperimentalFrameExtractor. Useandroidx.media3.inspector.frame.FrameExtractorinstead.ChannelMixingMatrix.create(). UseChannelMixingMatrix.createForConstantGain()instead.androidx.media3.extractor.metadata.flac.VorbisComment. Useandroidx.media3.extractor.metadata.vorbis.VorbisCommentinstead.MediaSource.prepareSource(MediaSourceCaller, TransferListener).Use
MediaSource.prepareSource(MediaSourceCaller, TransferListener, PlayerId)instead.v1.9.4Compare Source
GL_DRAW_BUFFERandGL_READ_BUFFERwhen transitioning from surfaceless context.v1.9.3Compare Source
v1.9.2Compare Source
This release includes the following changes since
1.9.1 release:
ProgressiveMediaSourcepropagates out-of-date timelineinfo to player and the queued periods unexpectedly get removed
(#3016).
other UI surface like Android Auto or manufacturers not needing the
workaround (#3041).
v1.9.1Compare Source
This release includes the following changes since
1.9.0 release:
(#2929).
doSomeWorkinterval only after audiostarts to support smoother A/V sync at beginning of playback.
DefaultLoadErrorHandlingPolicywhereFileNotFoundExceptionand similar exception types were retriedmultiple times.
doSomeWorkwas mistakenly reduced by the elapsed time of the currentiteration of
doSomeWork. Addressing this hopefully extends CPU idletime and saves power.
attempting to use a fallback AVC or HEVC codec.
currently playing item from a playlist
(#2873).
MediaIteminstances when repeatedly usingExoPlayer.replaceMediaItemon the same item(#2993).
(#2979).
(#2840).
AC4Profile22and other legacy profileswhen assessing AC-4 decoder support in Automotive scenarios
(#2609).
changes to avoid stuttering playback
(#2941).
either contain only a single control sequence, or have critical info
split across multiple control sequences
(#2935).
MIME type provided in the IMA LOADED event. The fix now maps the ad MIME
type using the ad pod index and ad position.
getAdsManager()andAdEvent.getAd().MediaControllerconnected to a platformsession crashed the app if stop happened during ad playback
(#2948).
extrasBundleinstances in variousclasses to guard against malformed
Bundleinstances sent from otherprocesses.
COMMAND_SEEK_NEXTorCOMMAND_SEEK_BACKcan cause gaps in the system media notification(#2976).
(#2829).
when converting from legacy
MediaMetadataCompatandMediaDescriptionCompat(#3018).
PriorityTooLowExceptionis handledby
SegmentDownloader(for DASH, HLS and SmoothStreaming). Customoverrides of
SegmentDownloaderusing the protectedexecutemethodneed to provide their task wrapped in a
Supplierso it can berecreated (#2931).
Listener.onAssetListLoadCompletedcallback. This is a breaking changein an unstable API that requires apps that implement this callback to
add an additional argument of type
JSONObject(#2950).
(#2930).
NullPointerExceptionthat can occur when seeking priorto processing the first video frame
(#2965).
RemoteCastPlayertimeline from updatingcorrectly when replacing the playlist.
v1.9.0Compare Source
minSdkto23in line with other AndroidX libraries.PlayerTransferState, which facilitates transferring the playbackstate across
Playerinstances.void mute()andvoid unmute()methods to Player that preserveand consequently restore Player's volume before and after setting it to
zero.
WakeLockManager,WifiLockManager,AudioFocusManager,AudioBecomingNoisyManagerandStuckPlayerDetectorpreviously used byExoPlayerinternally to allowreuse for other players
(#1893).
ForwardingPlayerlistener handling when the underlying delegateplayer uses reference equality for comparing listener instances
(#2675).
Player.listenTosuspending extension function in themedia3-common-ktxlibrary that specifies the particularPlayer.Eventsthat should be acted upon.BasePlayer.getBufferedPercentageresulting from integeroverflow when the reported buffered position is implausibly much larger
than the reported duration
(#2750).
TrackGrouptrack type by not ignoring customsample MIME type and falling back to using the potentially wrong track
type from the container MIME type
(#2860).
StuckPlayerExceptionplayer error if the player seems stuck. This happens in the following
cases, where each default timeout can be configured in
ExoPlayer.Builderif required:STATE_BUFFERINGwhile trying to play and nobuffering progress.
STATE_READYwhile trying to play and noplayback progress.
STATE_READYbeyond the declared duration withoutreaching the end of the item.
play.
background playback. This is equivalent to setting
ExoPlayer.Builder.setWakeModetoC.WAKE_MODE_LOCAL.change is reported to the
Contextoriginally passed toExoPlayer.Builder.ExoPlayer.setVirtualDeviceIdto manually update the virtual deviceID obtained from the
Contextpassed toExoPlayer.Builder.than 10 seconds before the end of the current item.
setSeekBackIncrementMs,setSeekForwardIncrementMsandsetMaxSeekToPreviousPositionMstoExoPlayerto update these settingsafter construction
(#2736).
DefaultPreloadManager. Apps now canreturn
DefaultPreloadManager.PreloadStatus.specifiedRangeCached(startPositionMs, durationMs)orDefaultPreloadManager.PreloadStatus.specifiedRangeCached(durationMs)via
TargetPreloadStatusControl.getTargetPreloadStatus(T rankingData)to indicate that a media item needs to be pre-cached.
DefaultPreloadManagerin shortformdemo app.
DefaultLoadControl.Buildersetters for local playback and adjustdefault values of
DefaultLoadControlto work well with a wide range oflocal files.
STATE_READYorSTATE_BUFFERING.addMediaItems(List<MediaItem>, List<T>)andaddMediaSources(List<MediaSource>, List<T>)that add the mediaitems or media sources in batch, and automatically call
invalidate()afterwards.removeMediaItems((List<MediaItem>)andremoveMediaSources(List<MediaSource>)that remove the media itemsor media sources in batch, and make sure that preload manager does
not start to preload or continue preloading any of them after
removal.
DefaultPreloadManager.setCurrentPlayingIndex(int)toinvalidate itself automatically. Apps don't need to call
invalidate()explicitly anymore after updating the current playingindex.
group of pictures while in scrubbing mode.
DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int)for apps to set a value of target buffer bytes for a player with the
specified
playerName. TheDefaultLoadControlcan now make decisionsof each player separately based on its own allocated bytes and target
buffer bytes.
SkipInfoto theAdPlaybackState.AdGroupto carry skipinformation for each ad in the ad group.
removeMediaItems(List)during playing apost-roll created a crash
(#2746).
always set as the last sample and rendered.
(#2382,
#2678).
DefaultPreloadManagerto avoid total buffer bytes for preloading fromgrowing arbitrarily. To use the default control logic, Apps can set the
target buffer bytes for preloading via
DefaultLoadControl.Builder.setPlayerTargetBufferBytes(String, int)fora
playerNameofPlayerId.Preload.name("preload"), and inject thecreated
DefaultLoadControlviaDefaultPreloadManager.Builder.setLoadControl(LoadControl).cloneAndSet(int, int)toShuffleOrderwith a defaultimplementation (#2834).
adjustment or auto transition
(#2484).
This feature is implemented for
MediaCodecbased renderers andrequires API 29+.
ExoPlayer.setAudioCodecParameters()andExoPlayer.setVideoCodecParameters()to apply parameters.ExoPlayer.addAudioCodecParametersChangeListener()andExoPlayer.addVideoCodecParametersChangeListener()to listen forchanges. Observing vendor-specific keys requires API 31+.
IllegalStateExceptioncaused by setting an empty media sourceafter seeking to a non-zero position and then preparing the player with
a non-empty media source.
could cause
IllegalStateException.NullPointerExceptioninDefaultPlaybackSessionManager(#2885).
timeout issues with this platform API have been fixed
(#1641).
MediaCodecVideoRenderer.experimentalSetLateThresholdToDropDecoderInputUsto 15ms and enable more efficient dropping of video frames before
decoding for eligible videos.
DefaultLoadControl. This should only take effect if an excessivenumber of tracks get selected
(#2860).
mode near the end could cause a seek to the next media item.
CompositionPlayerunder a new@ExperimentalApiannotation toindicate 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).
COMMAND_SET_AUDIO_ATTRIBUTESand audio focus handlingin
CompositionPlayer.CompositionPlayer.EditedMediaItem.removeVideo.InAppMp4Muxeras default muxer.EditedMediaItem.Builder#setSpeed()and deprecateEffects#createExperimentalSpeedChangingEffects().forceAudioTrackandforceVideoTrackwithtrackTypesinEditedMediaItemSequence.TrackSelectionParameters.selectTextByDefaultto prefer theselection of any text track without specifying other more specific
preferences.
preferredVideoLabels,preferredAudioLabelsandpreferredTextLabelsinTrackSelectionParametersto specify apreference for tracks with a specific label, for example those read from
HLS NAME tags (#1666).
headers in the encoded FLAC data, resulting in decoding errors
(#558).
files (#811,
#5718).
for a sync byte
(#2713).
FLAG_ENABLE_INDEX_SEEKINGto prefer seeking informationfrom 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).
Mp3Extractorto default to a constant bitrate (CBR)assumption when no seeking metadata (e.g., Xing, VBRI) is found, even
when
FLAG_ENABLE_INDEX_SEEKINGis set. This is based on the MP3specification'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).
audio/mpeg(MP3),audio/mpeg-L1andaudio/mpeg-L2MIME types by peeking the layer value of the firstsample before emitting a track format from the extractor
(#2683).
stblbox larger than 1MB implies the file must be non-fragmented(#2650).
©mvn(movement name) and©mvi(movement index)metadata, these are now emitted as
TextInformationFrameobjects inFormat.metadatawith IDs ofMVNMandMVINrespectively(#2754).
stsdbox (instead of failing to parsethe whole file).
(#6225).
MatroskaExtractorwhere seeking could be inaccuratefor files with multiple tracks. Cue points are now correctly associated
with their respective tracks, leading to more precise seeking.
IllegalArgumentExceptionfromReorderingBufferQueuecaused by PES packets with no timestamp
(#2764).
HeifExtractorcannow parse HEIC files containing embedded video and audio tracks.
:media3-inspectormodule to serve as the dedicatedhome for media inspection utilities. This module now houses a new
androidx.media3.inspector.MetadataRetriever, which will provide aunified API for both metadata and frame extraction. The existing
androidx.media3.exoplayer.MetadataRetrieveris now deprecated in favorof this new version.
androidx.media3.inspector.FrameExtractor, a new public APIfor frame extraction. This
AutoCloseableclass provides a way toextract frames with support for HDR video, video effects, and custom
decoder selection. It should be created via its
Builderfor a specificMediaItem.getThumbnail()to extract a representativethumbnail frame from a media file without requiring a specific
timestamp.
androidx.media3.inspector.MediaExtractorCompat, a drop-inreplacement for the platform's
android.media.MediaExtractorthatprovides a way to extract raw, encoded media samples from a media file.
The existing
androidx.media3.exoplayer.MediaExtractorCompatis nowdeprecated in favor of this new class.
AudioProcessorinstances aware of seeking.AudioOutputProviderinterface intoDefaultAudioSink.Builderto support custom audio output paths. Thedefault is
AudioTrackAudioOutputProvider.GainProcessor.support assessment
(#2580).
the beginning of playback
(#2646).
(#1346).
Sonic.ToFloatPcmAudioProcessor.codecs (#2856).
(#2775).
thumbnail track
(#2815).
MediaDrmCallbackmethods frombyte[]to anew
MediaDrmCallback.Responsetype, to allow returning extra optionalinformation. This is a source breaking change, but breakages can be
easily resolved by wrapping the previous
byte[]return value withnew Responsebefore returning.AnalyticsListener.onDrmKeysLoaded(#1001).
Presentation.copyWithUnsetSideRoundedToto round the unset outputside when
Presentationis created with a single side length.MediaMuxerCompat, a drop-in replacement for frameworkMediaMuxer.MuxerUtil.createMotionPhotoFromJpegImageAndBmffVideo()to allowMotion Photo creation.
WebmMuxerto allow muxing ofOPUS,VORBIS,VP8andVP9media streams into a
webmfile format.IMA android archive instead.
ImaServerSideAdInsertionUriBuilder.setNetworkCode, a new API forsetting 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.
desugaring. This must also be enabled by dependent apps too. See IMA's
config notes.
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.
be wrongly reported as an ad playback error
(#2656).
MediaSession.Callback.onPlaybackResumptiontoindicate if the call happens to gather information only or to start
playback (#1764).
MediaSession.ControllerInfo.isTrustedto also declarecontrollers from the own app as trusted
(#2542).
MediaSessionService.triggerNotificationUpdateto manually triggera notification update
(#1833).
ProgressListenerto custom command methods.MediaLibrarySession.Builder.setLibraryErrorReplicationModeto nonfatal.
Contextparameter toMediaButtonReceiver.onForegroundServiceStartNotAllowedException(#2625).
PlaybackInfoinstead offetching it via binder. This ensures that playback type and volume
control ID are read atomically and do match to each other.
ACTION_UPkey events were filtered out before passingthem to the callback for custom handling. This brings parity with what
media1 did and the platform does
(#2637).
getCurrentTimeline()was called byPlayerWrapperevenwhen the command isn't available
(#2665).
which caused a memory leak after the service terminated
(#2692).
MediaBrowser, customcommands are sent to the session only if the custom action is advertised
as a custom action in
PlaybackStateCompatof the legacy session. Allother custom actions are sent to the service.
onAudioSessionIdChangedto notify media controllers whenan audio session ID is set by the session
(#244).
KEYCODE_HEADSETHOOKdid not start the player upon andmedia key event
Intentarriving inonStartCommand(). This is fixedby handling 'KEYCODE_HEADSETHOOK' just like
KEYCODE_MEDIA_PLAY_PAUSE(#2816).
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
setVideoSurfaceHoldercall.StringCharSequencemetadata values likespan-styled strings
(#2853).
CommandButton.executeActionso that controllers can more easilytrigger the intended action. Also allow to specify parameters for some
player and session commands to define which action to trigger.
CommandButtoninstances usingPlayer.Commandor non-customSessionCommandto define their action.These are now correctly represented in platform media sessions, for
example for System UI or Android Auto.
Bitmapis compressed multiple times whenconnecting a
MediaControllerto a platform media session.ProgressStateWithTickIntervalclass and the correspondingrememberProgressStateWithTickIntervalComposable tomedia3-ui-composemodule. This state holder is used indemo-composeto display the current position and duration in text form.
MuteButtonStatetoui-composethat handles muting of thePlayervolume. This state holder is used indemo-composeto displaymute/unmute toggle button.
ProgressStateWithTickCountclasses and the correspondingrememberProgressStateWithTickCountComposable tomedia3-ui-composemodule. This state holder is used in
demo-composeto display progressas a horizontal read-only progress bar.
ContentFrameComposable tomedia3-ui-composewhich combinesPlayerSurfacemanagement with aspect ratio resizing and covering witha shutter.
when using
SurfaceViewinside a ComposeAndroidViewand henceaffecting
ContentFrameandPlayerSurfaceComposables withSURFACE_TYPE_SURFACE_VIEW(#1237,
#2811).
media3-ui-compose-material3module and addMaterial3-themed Composables (PlayPauseButton, NextButton,
PreviousButton, SeekBackButton, SeekForwardButton, RepeatButton,
ShuffleButton, MuteButton) to it.
TimeTextcomposable tomedia3-ui-compose-material3fordisplaying player progress in a textual form. It can be configured to
show the current position, duration, or remaining time.
PlayerView.BidiFormatterto correctly display punctuation in RTL textsubtitles (#11214).
document into the
AdPlaybackStatefor public access.EXT-X-PROGRAM-START-DATE tag defining the start time was removed from a
playlist (#2760).
playlist (#2826).
HlsInterstitialsAdsLoader.skipCurrentAd()andskipCurrentAdGroup()and corresponding methods to skip ads and adgroups by index.
HlsInterstitialsAdsLoader.Listener.onAdStartedto report the startof an ad period
(#2859).
HlsMediaPlaylistwithno segments (#2821).
UnsupportedOperationExceptionwhen playing DASH streams with anon-hierarchical
data:URI manifest(#2688).
LiveConfigurationto the value provided by theMediaItemofthe
DashMediaSourcewhen released and when the media item is updatedby the user (#2606).
as player errors
(#2805).
for H264 and H265
(#2613).
dav1dlibrary, replacing the previouslibgav1implementation forimproved decoding speed.
playing by ensuring the
STREAMINFOblock is correctly parsed andpassed to the decoder
(#2887).
CastPlayer.Builder, which enablesCastPlayerto do both localand Cast playback. To keep the old
CastPlayerbehavior of supportingonly Cast playback, you can use
RemoteCastPlayer. The pre-existingCastPlayerconstructors keep their old behavior, but are deprecated infavour of using the
CastPlayerorRemoteCastPlayerbuilders instead.DefaultMediaItemConverter.MediaItem.mediaMetadata.mediaTypeto infer the Cast MEDIA_TYPE touse in
DefaultCastOptionsProvider#toMediaQueueItem, when available.DefaultCastOptionsProvider.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).
FakeClock. Itdefaults to 1 second, but is configurable via
FakeClock.Builder.RobolectricUtil.runMainLooperUntil(andrunLooperUntil). It defaultsto 1 second, but is configurable via new overloads of these methods.
CapturingRenderersFactoryfromtest-utilstotest-utils-robolectric.DefaultPreloadManagerconstructor. UseDefaultPreloadManager.Builderinstead.EditedMediaItemSequenceconstructors. UseEditedMediaItemSequence.Builderinstead.BitmapFactoryImageDecoder.BitmapDecoder. UseExternallyLoadedImageDecoderinstead.ShadowMediaCodecConfig.forAllSupportedMimeTypes().Use
ShadowMediaCodecConfig.withAllDefaultSupportedCodecs()instead.ShadowMediaCodecConfig.withNoDefaultSupportedMimeTypes(). UseShadowMediaCodecConfig.withNoDefaultSupportedCodecs()instead.v1.8.1Compare Source
GL_DRAW_BUFFERandGL_READ_BUFFERwhen transitioning from surfaceless context.v1.8.0Compare Source
This release includes the following changes since the
1.7.1 release:
ForwardingSimpleBasePlayer.ExoPlayerinterface(#2522).
DefaultAudioSinkis accessed frommultiple threads. If this happens due to a call to
RendererCapabilities.getFormatSupportoutside of the player, make sureto call this method on the same thread as ExoPlayer's playback thread or
use a different instance than the one used for playback
(#1191).
unsupported by
DefaultTrackSelector.DECODE_ONLYflag (which is enabled by default in scrubbing mode).Contextpassed toExoPlayer.Builder.MediaCodec.BUFFER_FLAG_DECODE_ONLYby default in scrubbing mode.IllegalStateExceptionwhenPreloadMediaSourceis played by anExoPlayerwith a playback thread that is different than the preloadthread (#2495).
cloneAndMovetoShuffleModewith a default implementation(#2226).
Renderer.getMinDurationToProgressUstoreturn a larger value if no call to
renderis required.end while paused. For now, the bug fix only takes effect if
ExoPlayer.Builder.experimentalSetDynamicSchedulingEnabledis enabled.ExoPlayer.setScrubbingModeEnabled(boolean)method. This optimizesthe 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(..)onExoPlayerandExoPlayer.Builder.AdsMediaSourcemay benever reported (#2337).
MergingMediaSource, for example used whensideloading subtitles
(#2338).
CmcdConfiguration.Factoryto returnnullto disable CMCDlogging for specific media items
(#2386).
text tracks) to 26MB, which is large enough for 50MP Ultra HDR images
(#2417).
PreCacheHelperthat allows apps to pre-cache a single media withspecified start position and duration.
DefaultPreloadManager.CodecDbLitethat enables chipset specific optimizations of videoencoding settings.
setEnableCodecDbLiteflag to theDefaultEncoderFactoryto enableCodecDB Lite settings optimization. By default, this flag is set to
false.
addGap()) with silent audio nowrequires explicitly setting
experimentalSetForceAudioTrack(true)inEditedMediaItemSequence.Builder. If the gap is in the middle of thesequence, then this flag is not required.
Muxerinterface frommedia3-transformertomedia3-muxer.MediaItem.Builder().setImageDuration(long)mandatory toimport a media item as an image.
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.
custom
VideoCompositorSettingsto arrange sequences into a 2x2 or PiPlayout.
(#2084).
(#2552).
sidxatoms.This behavior can be enabled using the
FLAG_MERGE_FRAGMENTED_SIDXflagon
FragmentedMp4Extractor(#9373).
placeholder seek points), and fall back to binary search seeking if the
duration of the file is known
(#2327).
(#2456).
WavExtractorto use the header extension's SubFormat data forthe audio format when parsing a
WAVE_FORMAT_EXTENSIBLEtype file.ipcmandfpcmboxes defining raw PCM audiotracks (64-bit floating point PCM is not supported).
tkhdtransformation matrices thatboth 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).
variable bitrate metadata when falling back to constant bitrate seeking
due to
FLAG_ENABLE_CONSTANT_BITRATE_SEEKING(_ALWAYS)(#2194).
AnalyticsListener.onAudioPositionAdvancingis not calledwhen the audio playback is started very close to the end of the media.
ChannelMappingAudioProcessorandTrimmingAudioProcessor.CompositionPlayer.BaseAudioProcessor#flush()fromBaseAudioProcessor#reset().ChannelMappingAudioProcessor,TrimmingAudioProcessorandToFloatPcmAudioProcessorpublic(#2339).
AudioTrack#getUnderrunCount()inAudioTrackPositionTrackertodetect underruns in
DefaultAudioSinkinstead of best-effortestimation.
audio output device.
from pause when connected to Bluetooth devices.
AnalyticsListener.onAudioPositionAdvancingwas notreporting the time when the audio started advancing but the time of the
first measurement.
some devices (#2258).
(#2059).
start at exactly the requested position.
(#2059).
ExoPlayerAPI to include theMediaCodec.BUFFER_FLAG_DECODE_ONLYflag when queuing decode-only inputbuffers. This flag will signal the decoder to skip the decode-only
buffers thereby resulting in faster seeking. Enable it with
DefaultRenderersFactory.experimentalSetEnableMediaCodecBufferDecodeOnlyFlag.lead to some additional tracks being marked as
EXCEEDS_CAPABILITIES.(#2408).
(#2510).
later loads successfully, followed by several empty subtitle segments
(#2517).
(#2309).
error to a live stream with an empty subtitle track
(#2328).
B-frames (#2372).
CodecId = S_TEXT/SSAin Matroskafiles. Previously
MatroskaExtractoronly supportedCodecId = S_TEXT/ASSwhich is meant to represent the 'advanced' (v4+) variant ofSubStation Alpha subtitles (but ExoPlayer's parsing logic is the same
for both variants)
(#2384).
layerproperty in SubStation Alpha (SSA) subtitlefiles which is used to define the z-order of cues when more than one is
shown on screen at the same time
(#2124).
TimelinetoMetadataRetrieverand migrated it to an instance-based,AutoCloseableAPI. Use the newBuilderto create an instance for aMediaItem, then callretrieveTrackGroups(),retrieveTimeline(),and
retrieveDurationUs()to getListenableFutures for the metadata.The previous static methods are now deprecated
(#2462).
BitmapFactoryImageDecoder, to avoid an app crashing withCanvas: trying to draw too large bitmap.fromPlayerViewwhen trying todisplay very large (e.g. 50MP) images.
DefaultRenderersFactory.getImageDecoderFactory()to take aContextparameter.
CompositionPlayerwith thatalready used in
Transformer(meaningCompositionPlayerdoes notconsider the display size when decoding bitmaps, unlike
ExoPlayer).OfflineLicenseHelper.newWidevineInstanceacceptinga
MediaItem.DrmConfigurationso that HTTP request headers can beapplied correctly
(#2169).
Presentation.createForShortSide(int)that creates aPresentationthat ensures the shortest side always matches the given value,
regardless of input orientation.
fragmented MP4.
writeSampleData()API now uses muxer specificBufferInfoclassinstead of
MediaCodec.BufferInfo.Muxer.Factory#supportsWritingNegativeTimestampsInEditListwhichdefaults to false.
another ad group.
Ads groups with a start time after the window are not enqueued into the
MediaPeriodQueueanymore(#2215).
controllers are ignored.
legacy
MediaBrowserServiceCompat. This is in parity with the behaviorof legacy controllers/browsers when connected to a legacy app.
treated as a persistent custom exception. This prevents the application
from recovering.
session may cause
IllegalStateExceptions.leave the controller in an invalid state.
(#2330).
setSessionExtrasfrom the main thread whenrunning the player from a different application thread then the main
thread caused an
IllegalStateException(#2265).
items without preparing or playing them
(#2423#2423). This behavior
is configurable via
MediaSessionService.setShowNotificationForIdlePlayer.PlaybackExceptionfor all or selected controllers.MediaControllercan causean
IllegalArgumentException.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).
getLibraryRootof aMediaBrowserconnected to a legacy
MediaBrowserServiceCompatproduced aNullPointerException.request crashed the legacy session app with a
ClassNotFoundException.MediaItem.LocalConfiguration.uriwas shared to theplatform sessions's
MediaMetadata. To intentionally share a URI toallow controllers to re-request the media, set
MediaItem.RequestMetadata.mediaUriinstead.PlayerSurfaceinside re-usable components likeLazyColumndidn't work correctly(#2493).
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).
media3-ui-composemodule forSeekBackButtonStateandSeekForwardButtonState.PlayerControlView. Whenenabled, this puts the player into scrubbing mode when the user starts
dragging the scrubber bar, issues a
player.seekTocall for everymovement, and then exits scrubbing mode when the touch is lifted from
the screen. This integration can be enabled with either
time_bar_scrubbing_enabled = truein XML or thesetTimeBarScrubbingEnabled(boolean)method from Java/Kotlin.PlayerSurfaceaccept a nullablePlayerargument.progressive stream with
DownloadHelper, and request aDownloadRequestfrom the helper with specifying the time-based mediastart and end positions that the download should cover. The returned
DownloadRequestcarries the resolved byte range, with which aProgressiveDownloadercan be created and download the contentcorrespondingly.
DownloadHelper.Factorywith which the staticDownloadHelper.forMediaItem()methods are replaced.FactoryforSegmentDownloaderimplementations.adaptive stream with
DownloadHelper, and request aDownloadRequestfrom the helper with specifying the time-based media start and end
positions that the download should cover. The returned
DownloadRequestcarries the resolved time range, with which a concrete
SegmentDownloadercan be created and download the contentcorrespondingly.
(#5975).
HlsSampleStreamWrapperattempts to seek inside bufferwhen there are no chunks available in the buffer
#2598.
and preload hints can cause playback to get stuck or freeze
(#2299).
CAN-BLOCK-RELOAD=YESis not honored by the server(#2317).
before a mid roll and asset list resolution was attempted for the wrong
ad (#2558).
\f(form feed) in quoted stringattribute values
(#2420).
(#2427).
live stream runs out of segments to load
(#2401#2401).
are grouped already
(#1666).
HlsInterstitialsAdsLoader.adaptation set to form an invalid
TrackGroup(#2148).
when samples beyond the new duration have already been read by the
rendering pipeline
(#2440).
(#2475).
7798#4.4.2 (#2413).
RtspClientto use the location uri as provided when processing anHTTP 302 response
(#2398).
trailing whitespace characters
(#2357).
DefaultTrackSelector.setAllowInvalidateSelectionsOnRendererCapabilitiesChangehas no effect for audio decoder extensions
(#2258).
setVolume(), andgetVolume()(#2279).
empty.
getDeviceVolume(),setDeviceVolume(),getDeviceMuted(), andsetDeviceMuted()(#2089).
advance(player).untilPositionAtLeastanduntilMediaItemIndextoTestPlayerRunHelperin order to advance the player until a specifiedposition is reached. In most cases, these methods are more reliable than
the existing
untilPositionanduntilStartOfMediaItemmethods.FakeDownloadertotest-utils-robolectricmodule for reuse inother tests.
transformer.TestUtil.addAudioDecoders(String...),transformer.TestUtil.addAudioEncoders(String...), andtransformer.TestUtil.addAudioEncoders(ShadowMediaCodec.CodecConfig, String...). UseShadowMediaCodecConfigto configure shadow encodersand decoders instead.
ShadowMediaCodecConfig.SegmentDownloaderconstructorSegmentDownloader(MediaItem, Parser<M>, CacheDataSource.Factory, Executor)and the corresponding constructors in its subclassesDashDownloader,HlsDownloaderandSsDownloader.Player.hasNext(),Player.hasNextWindow(). UsePlayer.hasNextMediaItem()instead.Player.next(). UsePlayer.seekToNextMediaItem()instead.
Player.seekToPreviousWindow(). UsePlayer.seekToPreviousMediaItem()instead.Player.seekToNextWindow(). UsePlayer.seekToNextMediaItem()instead.BaseAudioProcessorinexoplayermodule. UseBaseAudioProcessorundercommonmodule.MediaCodecVideoRendererconstructorMediaCodecVideoRenderer(Context, MediaCodecAdapter.Factor, MediaCodecSelector, long, boolean, @​Nullable Handler, @​Nullable VideoRendererEventListener, int, float, @​Nullable VideoSinkProvider).v1.7.1This 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.0This release should have been
1.7.0-alpha01, but was accidentally tagged1.7.0(i.e. stable) on maven.google.com. Please do not use it. Stay on1.6.1 or upgrade to 1.7.1 (which has the same code as 1.6.1).
v1.6.1Compare Source
This release includes the following changes since the
1.6.0 release:
PlaybackParameters.withPitch(float)method for easily copying aPlaybackParameterswith a newpitchvalue(#2257).
error during initialization of the next media item
(#2229).
ProgressiveMediaPeriodthrows anIllegalStateExceptionasPreloadMediaSourceattempts to call itsgetBufferedDurationUs()before it is prepared(#2315).
CmcdDatain manifest requests for DASH, HLS, andSmoothStreaming (#2253).
AdPlaybackState.withAdDurationsUs(long[][])can be used afterad 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).
alternate_groupfrom thetkhdbox and expose it as anMp4AlternateGroupDataentry in each track'sFormat.metadata(#2242).
playlist of short content
(#1920).
MediaSessioncallbacks from 500to 100 milliseconds and add an experimental setter to allow apps to
configure this value.
the user (#2302).
wrapped player is actually empty. This happened when the wrapped player
doesn't have
COMMAND_GET_TIMELINEavailable whileCOMMAND_GET_CURRENT_MEDIA_ITEMis available and the wrapped player isempty (#2320).
MediaSessionService.setMediaNotificationProvideris silently ignoredafter other interactions with the service like
setForegroundServiceTimeoutMs(#2305).
PlayerSurfaceto work withExoPlayer.setVideoEffectsandCompositionPlayer.PlayerSurfacecan't be recomposed with a newPlayer.CmcdDatafor HLS media,causing an assertion failure when processing encrypted media segments
(#2312).
session to use TCP
(#1484).
(#2235).
v1.6.0Compare Source
This release includes the following changes since the
1.5.1 release:
AudioManagerCompatandAudioFocusRequestCompatto replace theequivalent classes in
androidx.media.plugin. Upgrade KotlinX Coroutines library from 1.8.1 to 1.9.0.
Format.toBundle(boolean excludeMetadata)method, useFormat.toBundle()instead.SimpleBasePlayerwhere setting a newcurrentMediaItemIndexinStateaftersetPlaylistwithnullMediaMetadatadoes not reevaluate the metadata(#1940).
SimpleBasePlayer.Stateaccess from protected to public to makeit easier to handle updates in other classes
(#2128).
MediaExtractorCompat, a new class that provides equivalentfeatures to platform
MediaExtractor.MediaCodecVideoRenderer. You can configureDefaultRenderersFactorythrough
experimentalSetEnableMediaCodecVideoRendererPrewarmingtoprovide a secondary
MediaCodecVideoRenderertoExoPlayer. Ifenabled,
ExoPlayerpre-processes the video of consecutive media itemsduring playback to reduce media item transition latency.
bufferForPlaybackMsandbufferForPlaybackAfterRebufferMsinDefaultLoadControlto 1000 and2000 ms respectively.
DeviceInfoand device volume asynchronously (if enabledusing
setDeviceVolumeControlEnabled). These values aren't availableinstantly after
ExoPlayer.Builder.build(), andPlayer.Listenernotifies changes through
onDeviceInfoChangedandonDeviceVolumeChanged.creating the player. You can use
AnalyticsListener.onAudioSessionIdChangedto listen to the initialupdate if required.
'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).selectedAudioLanguageparameter toDefaultTrackSelector.selectVideoTrack()method.retryCountparameter toMediaSourceEventListener.onLoadStartedand corresponding
MediaSourceEventListener.EventDispatchermethods.with durations that don't match the actual content could cause frame
freezes at the end of the item
(#1698).
BasePreloadManager.Listenerto a top-levelPreloadManagerListener.RenderersFactory.createSecondaryRenderercan be implemented to providesecondary renderers for pre-warming. Pre-warming enables quicker media
item transitions during playback.
CmcdDatafor manifest requests in adaptive streamingformats DASH, HLS, and SmoothStreaming
(#1951).
MediaCodecInfoof the codec that will be initialized inMediaCodecRenderer.onReadyToInitializeCodec(#1963).
AdsMediaSourceto allow theAdPlaybackStatesto grow byappending ad groups. Invalid modifications are detected and throw an
exception.
succession when transitioning to content media after a mid-roll ad.
DefaultRenderersFactoryadd twoMetadataRendererinstances toenable apps to receive two different schemes of metadata by default.
playback is paused
(#1785).
ClippingMediaSourceto allow clipping in unseekablemedia.
transition.
ExoPlayer.isLoading()remainstruewhile it hastransitioned to
STATE_IDLEorSTATE_ENDED(#2133).
lastRebufferRealtimeMstoLoadControl.Parameter(#2113).
formats.
format.
VideoFrameProcessor.registerInputStreamandVideoFrameProcessor.Listener.onInputStreamRegisteredto useFormat.DefaultEncoderFactory.MediaMetricsManager. Transformer forwards editing events andperformance 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).InAppMuxerintoInAppMp4MuxerandInAppFragmentedMp4Muxer.You use
InAppMp4Muxerto produce a non-fragmented MP4 file, whileInAppFragmentedMp4Muxeris for producing a fragmented MP4 file.Muxerinterface frommedia3-muxertomedia3-transformer.MediaProjectionAssetLoader, which provides media from aMediaProjectionfor screen recording, and add support for screenrecording to the Transformer demo app.
#getInputFormat()toCodecinterface.GlObjectsProvideronto thecaller in
DefaultVideoFrameProcessorandDefaultVideoCompositorwhenpossible.
the stream header stores the number of bytes instead of the number of
chunks.
than 4).
ArrayIndexOutOfBoundsExceptionin MP4 edit lists when the editlist starts at a non-sync frame with no preceding sync frame
(#2062).
(#2069).
play with
IllegalStateException: Playback stuck buffering and not loading(#2197).onAudioPositionAdvancingto be called when playback resumes(previously it was called when playback was paused).
SonicAudioProcessorwhenSpeedChangingAudioProcessorisconfigured with default parameters.
Sonic#getOutputSize()that could causeDefaultAudioSinkto stall.MediaCodecAudioRenderer.getDurationToProgressUs()andDecoderAudioRenderer.getDurationToProgressUs()so that seeks correctlyreset the provided durations.
androidx.media3.common.audio.SonicAudioProcessorfinal.ChannelMappingAudioProcessorandTrimmingAudioProcessor.MediaCodecVideoRenderer.shouldUsePlaceholderSurfacetoprotected so that applications can override to block usage of
placeholder surfaces
(#1905).
ExoPlayerAV1 sample dependency parsing to speed upseeking. Enable it with the new
DefaultRenderersFactory.experimentalSetParseAv1SampleDependenciesAPI.ExoPlayerAPI to drop lateMediaCodecVideoRendererdecoder input buffers that are not depended on. Enable it with
DefaultRenderersFactory.experimentalSetLateThresholdToDropDecoderInputUs.very slow decoding any pending frames
(#1973).
screen flickering
(#2059).
(#8260).
MediaItem.Builder.setSubtitleConfigurations, and instead only load oneif it is selected by track selection
(#1721).
tts:originandtts:extentusingstyle(#2953).Previously we incorrectly parsed any number of decimal places but always
assumed the value was in milliseconds, leading to incorrect timestamps
(#1997).
or CEA-708 captions.
IllegalStateExceptionwhen an SSA file contains a cue with zeroduration (start and end time equal)
(#2052).
the same container as audio and video
(#2052).
line endings (#2167).
MediaCodec$CryptoException: Operation not supported in this configurationerror when playing ClearKey content on API below 27(#1732).
OverlaySettingsintoStaticOverlaySettings.OverlaySettingscan be subclassed to allowdynamic overlay settings.
MuxerExceptionout ofMuxerinterface to avoid a very longfully qualified name.
setSampleCopyEnabled()method tosetSampleCopyingEnabled()in both
Mp4Muxer.BuilderandFragmentedMp4Muxer.Builder.Mp4Muxer.addTrack()andFragmentedMp4Muxer.addTrack()now return aninttrack ID instead of aTrackToken.Mp4MuxerandFragmentedMp4Muxerno longer implementMuxerinterface.
Mp4Muxersample batching and copying by default.FragmentedMp4Muxerthat creates a lot of fragments whenonly audio track is written.
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 usedto stop the foreground service before
stopSelf()when overridingonTaskRemoved, useMediaSessionService.pauseAllPlayersAndStopSelf()instead.
state. The notification is only removed if the playlist is cleared or
the player is released.
and ACTION_PAUSE to only set one of them according to the available
commands and also accept if only one of them is set.
Contextas a parameter toMediaButtonReceiver.shouldStartForegroundService(#1887).
Playermethod on aMediaControllerconnectedto a legacy session dropped changes from a pending update.
MediaSession.setSessionActivity(PendingIntent)accept null(#2109).
cleared (#2211).
media3-ui-composemodule forPlayerSurface,PresentationState,PlayPauseButtonState,NextButtonState,PreviousButtonState,RepeatButtonState,ShuffleButtonStateandPlaybackSpeedState.CacheWriterthat leaves data sources open and cache areaslocked in case the data source throws an
Exceptionother thanIOException(#9760).
HlsInterstitialsAdsLoader. The ads loader readsthe HLS interstitials of an HLS media playlist and maps them to the
AdPlaybackStatethat is passed to theAdsMediaSource. This initialversion only supports HLS VOD streams with
X-ASSET-URIattributes.HlsInterstitialsAdsLoader.AdsMediaSourceFactory. Apps can use itto create
AdsMediaSourceinstances that use anHlsInterstitialsAdsLoaderin a convenient and safe way.SUPPLEMENTAL-CODECStag from HLS playlist to detect Dolby Visionformats (#1785).
(#2209).
(#1898).
multi-period live streams
(#1698).
scte214:supplementalCodecsattribute from DASH manifest todetect Dolby Vision formats
(#1785).
contains media samples beyond the declared period duration
(#1698).
adaptation-set-switchingbut different languages or role flags are merged together
(#2222).
module to decode MPEG-H audio
(#1826).
AudioSinkandAudioRendererEventListenerinstances intoMidiRenderer.play-services-cast-frameworkdependency to 21.5.0 to fix aFLAG_MUTABLEcrash in apps targeting API 34+ on devices with GooglePlay services installed but disabled
(#2178).
demo-composewith additional buttons and enhancePlayerSurfaceintegration with scaling and shutter support.AudioMixer.create()method. UseDefaultAudioMixer.Factory().create()instead.Transformer.Buildermethods:setTransformationRequest(), usesetAudioMimeType(),setVideoMimeType(), andsetHdrMode()instead.setAudioProcessors(), set the audio processor in anEditedMediaItem.Builder.setEffects(), and pass it toTransformer.start()instead.setVideoEffects(), set video effect in anEditedMediaItem.Builder.setEffects(), and pass it toTransformer.start()instead.setRemoveAudio(), useEditedMediaItem.Builder.setRemoveAudio()to remove the audio from the
EditedMediaItempassed toTransformer.start()instead.setRemoveVideo(), useEditedMediaItem.Builder.setRemoveVideo()to remove the video from the
EditedMediaItempassed toTransformer.start()instead.setFlattenForSlowMotion(), useEditedMediaItem.Builder.setFlattenForSlowMotion()to flatten theEditedMediaItempassed toTransformer.start()instead.setListener(), useaddListener(),removeListener()orremoveAllListeners()instead.Transformer.Listenermethods:onTransformationCompleted(MediaItem), useonCompleted(Composition, ExportResult)instead.onTransformationCompleted(MediaItem, TransformationResult), useonCompleted(Composition, ExportResult)instead.onTransformationError(MediaItem, Exception), useonError(Composition, ExportResult, ExportException)instead.onTransformationError(MediaItem, TransformationException), useonError(Composition, ExportResult, ExportException)instead.onTransformationError(MediaItem, TransformationResult, TransformationException), useonError(Composition, ExportResult, ExportException)instead.onFallbackApplied(MediaItem, TransformationRequest, TransformationRequest), useonFallbackApplied(Composition, TransformationRequest, TransformationRequest)instead.TransformationResultclass. UseExportResultinstead.
TransformationExceptionclass. UseExportExceptioninstead.
Transformer.PROGRESS_STATE_NO_TRANSFORMATION. UseTransformer.PROGRESS_STATE_NOT_STARTEDinstead.Transformer.setListener(). UseTransformer.addListener(),Transformer.removeListener()orTransformer.removeAllListeners()instead.Transformer.startTransformation(). UseTransformer.start(MediaItem, String)instead.SingleFrameGlShaderProgram. UseBaseGlShaderPrograminstead.Transformer.flattenForSlowMotion. UseEditedMediaItem.flattenForSlowMotioninstead.ExoPlayer.VideoComponent,ExoPlayer.AudioComponent,ExoPlayer.TextComponentandExoPlayer.DeviceComponent.androidx.media3.exoplayer.audio.SonicAudioProcessor.DownloadHelpermethods:DownloadHelper(MediaItem, @​Nullable MediaSource, TrackSelectionParameters, RendererCapabilities[]), useDownloadHelper(MediaItem, @​Nullable MediaSource, TrackSelectionParameters, RendererCapabilitiesList)instead.getRendererCapabilities(RenderersFactory), equivalentfunctionality can be achieved by creating a
DefaultRendererCapabilitiesListwith aRenderersFactory, andcalling
DefaultRendererCapabilitiesList.getRendererCapabilities().PlayerNotificationManager.setMediaSessionToken(MediaSessionCompat)method. Use
PlayerNotificationManager.setMediaSessionToken(MediaSession.Token)andpass in
(MediaSession.Token) compatToken.getToken()instead.v1.5.1Compare Source
This release includes the following changes since the
1.5.0 release:
codec timeout issues with this platform API
(#1641).
VBRIframe's table of contentsdoesn't cover all the MP3 data in a file
(#1904).
MediaCodecAdaptersupplied pixel aspect ratio valueswhen provided while processing
onOutputFormatChanged(#1371).
ReplacingCuesResolver.discardCuesBeforeTimeUswhere the cueactive at
timeUs(started before but not yet ended) was incorrectlydiscarded (#1939).
MediaMetadata(#1958).
v1.5.0Compare Source
This release includes the following changes since the
1.4.1 release:
ForwardingSimpleBasePlayerthat allows forwarding to anotherplayer with small adjustments while ensuring full consistency and
listener handling
(#1183).
SimpleBasePlayer.State.playlistbygetPlaylist()method.SimpleBasePlayer.State.Builder.setPlaylist()todirectly specify a
Timelineand currentTracksandMetadatainstead of building a playlist structure.
minSdkto 21 (Android Lollipop). This is aligned with allother AndroidX libraries.
androidx.media3:media3-common-ktxartifact which providesKotlin-specific functionality built on top of the Common library
Player.listensuspending extension function to spin a coroutine tolisten to
Player.Eventsto themedia3-common-ktxlibrary.@DoNotInlineannotations from manually out-of-lined innerclasses 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.
MediaCodecRenderer.onProcessedStreamChange()can now be called forevery media item. Previously it was not called for the first one. Use
MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()to enable this.
PreloadMediaSource.PreloadControl.onPreloadErrorto allowPreloadMediaSource.PreloadControlimplementations to take actions whenerror occurs.
BasePreloadManager.Listenerto propagate preload events to apps.timeout (#1540).
MediaCodecAdapter.Configuration.flagsas the field was alwayszero.
API 35+ (where the device advertises support for this).
Context.getSystemService(Context.AUDIO_SERVICE)until audio focushandling is enabled. This ensures the blocking call isn't done if audio
focus handling is not enabled
(#1616).
(#1571).
AnalyticsListener.onRendererReadyChanged()to signal whenindividual renderers allow playback to be ready.
MediaCodec.CryptoExceptionsometimes being reported as an"unexpected runtime error" when
MediaCodecis operated in asynchronousmode (default behaviour on API 31+).
bufferedDurationUsinstead ofbufferedPositionUswithPreloadMediaSource.PreloadControl.onContinueLoadingRequested(). Alsochanges
DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MStoDefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS, apps thenneed 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.
ForwardingRendererimplementation that forwards all method callsto another renderer
(1703).
enable preloading by calling
ExoPlayer.setPreloadConfiguration(PreloadConfiguration)accordingly.By default preloading is disabled. When opted-in and to not interfere
with playback,
DefaultLoadControlrestricts preloading to start andcontinue only when the player is not loading for playback. Apps can
change this behaviour by implementing
LoadControl.shouldContinuePreloading()accordingly (like whenoverriding this method in
DefaultLoadControl). The defaultimplementation of
LoadControldisables preloading in case an app isusing a custom implementation of
LoadControl.MediaSourceEventListener.EventDispatcher.dispatchEvent()toallow invoking events of subclass listeners
(1736).
DefaultPreloadManager.Builderthat builds theDefaultPreloadManagerandExoPlayerinstances with consistentlyshared configurations.
Renderer[]parameter fromLoadControl.onTracksSelected()asDefaultLoadControlimplementation can retrieve the stream types fromExoTrackSelection[].DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])and marked method as final to prevent overrides.The new
DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])should be used instead.
MediaSourceEventListenerevents from secondary sources inMergingMediaSource. This will result in loadstart/error/cancelled/completed events being reported for sideloaded
subtitles (those added with
MediaItem.LocalConfiguration.subtitleConfigurations), which may appearas duplicate load events emitted from
AnalyticsListener.Instead the problematic track is disabled and playback of the remaining
tracks continues
(#1722).
invalid subtitle data) and load errors (e.g. HTTP 404) are emitted
via
onLoadErrorcallbacks.errors are emitted via
onLoadErrorcallbacks while parse errorsare silently ignored (this is pre-existing behaviour).
with durations that don't match the actual content could cause frame
freezes at the end of the item
(#1698).
SntpClientto set the max elapsed time since the lastupdate after which the client is re-initialized
(#1794).
SurfaceAssetLoader, which supports queueing video data toTransformer via a
Surface.ImageAssetLoaderreports unsupported input viaAssetLoader.onErrorinstead of throwing an
IllegalStateException.MediaItem.Builder.setImageDurationMsmandatory for image export.DefaultTrackSelector: Prefer object-based audio over channel-basedaudio when other factors are equal.
Mp4ExtractorandFragmentedMp4Extractorto identify H264samples that are not used as reference by subsequent samples.
AmrExtractor.(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).processing edit lists in MP4 files
(#1659).
mdhdbox in
Mp4ExtractorandFragmentedMp4Extractor(#1531).
media_timein MP4 edit lists. Whilesegment_durationwas already correctly scaled using the movietimescale,
media_timeis now properly scaled using the tracktimescale, as specified by the MP4 format standard
(#1792).
endIndicescalculation for MP4 with editlist (#1797).
mdhdbox of MP4 files to handle-1values (#1819).
h263box in MP4 files for H.263 video(#1821).
(#1265).
HttpEngineDataSourceto allow use starting at version Sextension 7 instead of API level 34
(#1262).
DataSourceContractTest: Assert thatDataSource.getUri()returns theresolved 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 thatDataSource.getUri()andgetResponseHeaders()return their 'open' value after a failed call toopen()(due to a 'not found' resource) and before a subsequentclose()call.DataSourceContractTest.getNotFoundResources()allowstest 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).
present in the media.
time-stretching/pitch-shifting algorithm.
SpeedChangingAudioProcessorthat causes dropped outputframes.
MediaCodecVideoRendereravoids decoding samples that are neitherrendered nor used as reference by other samples.
MediaCodecAdaptermay now receive anullSurfaceinconfigureand calls to a new methoddetachOutputSurfaceto remove a previously set
Surfaceif the codec supports this(
MediaCodecInfo.detachedSurfaceSupported).MediaCodecAdaptersupplied pixel aspect ratio values if providedwhen processing
onOutputFormatChanged(#1371).
secure H264 streams to be marked as unsupported
(#1619).
returning an end-of-stream signal.
VoiceSpanand populate it forWebVTT voice spans
(#1632).
a 64-bit
longwhen represented as microseconds and multiplied by the90,000MPEG timebase) are displayed(#1763).
(#1820).
are enabled (#1863).
C.TRACK_TYPE_METADATAtype to tracks containing icy orvnd.dvb.ait content.
ExternallyLoadedImageDecoderfor simplified integration withexternal image loading libraries like Glide or Coil.
FileDescriptorDataSource, a newDataSourcethat can be used toread from a
FileDescriptor(#3757).
DefaultVideoFrameProcessorworkaround for minorSurfaceTexturescaling.
SurfaceTexturemay include a small scaling that cuts off a1-texel border around the edge of a cropped buffer. This is now handled
such that output is closer to expected.
DefaultVideoFrameProcessor.queueInputBitmap(). As a result,exporting images to videos with
Transformeris faster.ArrayIndexOutOfBoundsExceptioninImaServerSideAdInsertionMediaSource.result in an
ArrayIndexOutOfBoundsExceptionwhen playing past the lastmidroll (#1741).
MediaButtonReceiver.shouldStartForegroundService(Intent)to allowapps 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).
MediaBrowserbeingdispatched to the
MediaSessionCompat.Callbackinstead of theMediaBrowserServiceCompatvariant of the method when connected to alegacy service. This prevented the
MediaBrowserto receive the actualreturn value sent back by the legacy service
(#1474).
IllegalArgumentExceptionthrown by devices of certainmanufacturers when setting the broadcast receiver for media button
intents (#1730).
was known as
Custom browse actionswith the legacy library withMediaBrowserCompat. Note that with Media3 command buttons for mediaitems are available for both,
MediaBrowserandMediaController. SeeCustom Browse actions of AAOS.
app start a foreground service after requesting
play().CommandButton.Builder.setIconUrito only accept content Uris.MediaBrowserCompatwhen connecting to a legacyMediaBrowserCompat.The service can receive the connection hints passed in as root hints
with the first call to
onGetRoot().MediaBrowserconnected to a legacy browser service,didn't receive an error sent by the service after the browser has
subscribed to a
parentid.connected to a legacy
MediaBrowserServicedoesn't request the childrenof a
parentIdtwice when subscribing to a parent.PlayerView-in-Compose-AndroidViewworkaround opt-in, due to issueswith XML-based shared transitions. Apps using
PlayerViewinsideAndroidViewneed to callPlayerView.setEnableComposeSurfaceSyncWorkaroundin order to opt-in(#1237,
#1594).
setFullscreenButtonStatetoPlayerViewto allow updates offullscreen button's icon on demand, i.e. out-of-band and not reactively
to a click interaction
(#1590,
#184).
there are app-defined text track selection preferences.
(#1440).
Bad magic number for Bundleerror when playing SmoothStreamingstreams with text tracks
(#1779).
(#1138).
(#1225).
files containing IAMF tracks using the libiamf native library to
synthesize audio.
spatialization together with optional head tracking enabled, but
binaural playback support is currently not available.
(#1685).
enables the sender app to resume playback locally after a disconnection.
DeviceInfowhen aContextis provided. Thisenables linking the
MediaSessionto aRoutingSession, which isnecessary for integrating Output Switcher
(#1056).
DataSourceContractTestnow includes tests to verify:read positionis updated.offsetis applied correctly.(#1839).
Player.hasPrevious,Player.hasPreviousWindow().Use
Player.hasPreviousMediaItem()instead.Player.previous()method. UsePlayer.seekToPreviousMediaItem()instead.DrmSessionEventListener.onDrmSessionAcquiredmethod.DefaultEncoderFactoryconstructors. UseDefaultEncoderFactory.Builderinstead.Configuration
📅 Schedule: (UTC)
🚦 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.
This PR has been generated by Mend Renovate.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.