Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.3.1
->1.4.1
1.3.1
->1.4.1
Release Notes
androidx/media (androidx.media3:media3-session)
v1.4.1
Compare Source
This release includes the following changes since the
1.4.0 release:
PreloadMediaSource
(#1568).
(#1571).
Searched too many bytes
error by correctly ignoring trailingnon-MP3 data based on the length field in an
Info
frame(#1480).
tts:fontSize
values to ensure theyare correctly inherited from parent nodes with percentage
tts:fontSize
values.
IndexOutOfBoundsException
inLegacySubtitleUtil
due toincorrectly handling the case of the requested output start time being
greater than or equal to the final event time in the
Subtitle
(#1516).
android.media.MediaCodec$CryptoException: Operation not supported in this configuration: ERROR_DRM_CANNOT_HANDLE
error on API 31+ devicesplaying L1 Widevine content. This error is caused by an incomplete
implementation of the framework
MediaDrm.requiresSecureDecoder
method (#1603).
release()
method toGlObjectsProvider
.KEYCODE_HEADSETHOOK
into a 'seek to next'action, as
documented
(#1493).
KEYCODE_HEADSETHOOK
as a 'play' command inMediaButtonReceiver
when deciding whether to ignore it to avoid aForegroundServiceDidNotStartInTimeException
(#1581).
(#1087).
v1.4.0
Compare Source
This release includes the following changes since the
1.3.1 release:
BasePlayer.seekTo()
and
SimpleBasePlayer.handleSeek()
methods instead of ignoring them. Ifyou are implementing these methods in a custom player, you may need to
handle these additional calls with
mediaItemIndex == C.INDEX_UNSET
.(#1312).
MediaItem.Builder.setImageDurationMs()
is ignored for a non-image
MediaItem
(as documented).Format.customData
to store app-provided custom information aboutFormat
instances.BasePreloadManager
which coordinates the preloading for multiplesources based on the priorities defined by their
rankingData
.Customization is possible by extending this class. Add
DefaultPreloadManager
which usesPreloadMediaSource
to preload mediasamples of the sources into memory, and uses an integer
rankingData
that indicates the index of an item on the UI.
PlayerId
to most methods ofLoadControl
to enableLoadControl
implementations to support multiple players.
Buffer.isDecodeOnly()
andC.BUFFER_FLAG_DECODE_ONLY
. There isno need to set this flag as renderers and decoders will decide to skip
buffers based on timestamp. Custom
Renderer
implementations shouldcheck if the buffer time is at least
BaseRenderer.getLastResetPositionUs()
to decide whether a sampleshould be shown. Custom
SimpleDecoder
implementations can checkisAtLeastOutputStartTimeUs()
if needed or mark other buffers withDecoderOutputBuffer.shouldBeSkipped
to skip them.TargetPreloadStatusControl.getTargetPreloadStatus(T)
to indicate notto preload a
MediaSource
with the givenrankingData
.remove(MediaSource)
toBasePreloadManager
.reset()
toBasePreloadManager
to release all the holding sourceswhile keep the preload manager instance.
ExoPlayer.setPriority()
(andBuilder.setPriority()
) to definethe priority value used in
PriorityTaskManager
and for MediaCodecimportance from API 35.
incorrect
bs
(buffer starvation) key in CMCD(#1124).
PreloadMediaSource.PreloadControl.onLoadedToTheEndOfSource(PreloadMediaSource)
to indicate that the source has loaded to the end. This allows the
DefaultPreloadManager
and the customPreloadMediaSource.PreloadControl
implementations to preload the nextsource or take other actions.
playback exception.
clear
toPreloadMediaSource
to discard the preloading period.PlaybackException.ERROR_CODE_DECODING_RESOURCES_RECLAIMED
that is usedwhen codec resources are reclaimed for higher priority tasks.
AdsMediaSource
load preroll ads before initial content mediapreparation completes
(#1358).
STATE_ENDED
when re-preparing amulti-period DASH live stream after the original period was already
removed from the manifest.
onTimelineRefreshed()
toonSourcePrepared()
andonPrepared()
toonTracksSelected()
inPreloadMediaSource.PreloadControl
. Also rename the IntDefs inDefaultPreloadManager.Stage
accordingly.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.
Renderer.getDurationToProgressUs()
. ARenderer
can implementthis method to return to ExoPlayer the duration that playback must
advance for the renderer to progress. If
ExoPlayer
is set withexperimentalSetDynamicSchedulingEnabled()
thenExoPlayer
will callthis method when calculating the time to schedule its work task.
MediaCodecAdapter#OnBufferAvailableListener
to alert when inputand output buffers are available for use by
MediaCodecRenderer
.MediaCodecRenderer
will signalExoPlayer
when receiving thesecallbacks and if
ExoPlayer
is set withexperimentalSetDynamicSchedulingEnabled()
, thenExoPlayer
willschedule its work loop as renderers can make progress.
LoadControl
methods instead of individualparameters.
ExoPlayer.isReleased()
to check whetherExoplayer.release()
hasbeen called.
ExoPlayer.Builder.setMaxSeekToPreviousPositionMs()
to configurethe maximum position for which
seekToPrevious()
seeks to the previousitem (#1425).
transient focus loss while the player is paused
(#1436).
IndexOutOfBoundsException
caused by extractors reportingadditional tracks after the initial preparation step
(#1476).
Effects
inExoPlayer.setVideoEffect()
will receive the timestampswith the renderer offset removed
(#1098).
IllegalArgumentException
when handling player error thathappened while reading ahead into another playlist item
(#1483).
audioConversionProcess
andvideoConversionProcess
toExportResult
indicating how the respective track in the output filewas made.
DefaultAudioMixer
does not output the correctamount of bytes after being reset and reused.
at stereo when handling PCM input.
ExoPlayerAssetLoader
, ignore audio channelcount constraints as they only apply for playback.
androidx.media3.transformer.Muxer
interface withandroidx.media3.muxer.Muxer
and removeandroidx.media3.transformer.Muxer
.(#1373).
AudioGraphInput
to improve AV sync.ExportResult.processedInputs
field. If you use this field forcodec details, then use
DefaultDecoderFactory.listener
instead. Incase of a codec exception, codec details will be available in the
ExportException.codecInfo
.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).
Info
frame over the size reported bythe underlying stream (e.g. file size, or HTTP
Content-Length
header).This helps to exclude non-playable trailer data (e.g. album artwork)
from constant bitrate seeking calculations, making seeks more accurate
(#1376).
Info
frame (if present)to compute an average bitrate for constant bitrate seeking, rather than
extrapolating from the bitrate of the frame after the
Info
frame,which may be artificially small, e.g.
PCUT
frame(#1376).
(#1299).
in
DefaultAudioSink
prior to callingAudioTrack.stop()
so thatAudioTrack.StreamEventCallback#onPresentationEnded
correctlyidentifies when all pending data has been played.
SilenceSkippingAudioProcessor
where transitions betweendifferent audio formats (for example stereo to mono) can cause the
processor to throw an exception
(#1352).
MediaCodecAudioRenderer.getDurationToProgressUs()
so thatExoPlayer will dynamically schedule its main work loop to when the
MediaCodecAudioRenderer can make progress.
Listener.onRenderedFirstFrame()
arrives too early whenswitching surfaces mid-playback.
decoder if needed
(#1389).
mid-playback.
This issue was only introduced in Media3 1.4.0-alpha01.
instead of during rendering (see
ExoPlayer's architecture diagram
for the difference between extraction and rendering).
MediaSource.Factory.experimentalParseSubtitlesDuringExtraction(false)
and
TextRenderer.experimentalSetLegacyDecodingEnabled(true)
. Seethe
docs on customization
for how to plumb these components into an
ExoPlayer
instance.These methods (and all support for legacy subtitle decoding) will be
removed in a future release.
SubtitleDecoder
implementations need to updatethem to implement
SubtitleParser
instead (andSubtitleParser.Factory
instead ofSubtitleDecoderFactory
).0
as a color index, instead ofa literal color value
(#1367).
rowLock
value. The CEA-708-E S-2023 spec states thatrowLock
andcolumnLock
should both be assumed to be true, regardlessof the values present in the stream (
columnLock
support is notimplemented, so it's effectively assumed to always be false).
1.3.0-alpha01
release notes,but the change was accidentally reverted before the
1.3.0-rc01
release. This is now fixed, so the change is present again.
handling of the 'set pen location' command
(#1315).
IllegalArgumentException
fromLegacySubtitleUtil
when aWebVTT subtitle sample contains no cues, e.g. as part of a DASH stream
(#1516).
(
soal
), 'artist sort' (soar
) and 'album artist sort' (soaa
) MP4tags were wrongly mapped to the
TSO2
,TSOA
andTSOP
ID3 tags(#1302).
gnre
(genre) andtmpo
(tempo)tags when the value is more than one byte long.
TCON
frame toMediaMetadata.genre
(#1305).
(#1300).
null
as parameter forExoPlayer.setImageOutput()
to clear apreviously set
ImageOutput
.android.resource://package/id
raw resource URIswhere
package
is different to the package of the current application.This wasn't previously documented to work, but is a more efficient way
of accessing resources in another package than by name.
url
is non-null in theDataSpec
constructors. Thisparameter was already annotated to be non-null.
ByteArrayDataSource
to resolve a URI to a byte array duringopen()
, instead of being hard-coded at construction(#1405).
LoadErrorHandlingPolicy
onDefaultDrmSessionManagerProvider
(#1271).
EditedMediaItem
orComposition
inSpeedChangeEffect
.surface output in ExoPlayer.setVideoEffect and Transformer's Debug
SurfaceView.
documentation by flipping the x and y values applied in
setOverlayFrameAnchor()
. If usingOverlaySettings.Builder.setOverlayFrameAnchor()
, flip their x and yvalues by multiplying them by
-1
.TimestampWrapper
crashes when used withExoPlayer#setVideoEffects
(#821).
BT 709 SDR video. Also provide third option to retain the original
colorspace.
(#1055).
content (uses the HLG range).
SeparableConvolution
effects to be used before API 26.OverlaySettings.useHdr
since dynamic range of overlayand frame must match.
TextOverlay
. Luminance of the text overlay can beadjusted with
OverlaySettings.Builder.setHdrLuminanceMultiplier()
.DAI ad streams
to stable.
replaceAdTagParameters(Map <String, String>)
toImaServerSideAdInsertionMediaSource.AdLoader
that allows replacing adtag parameters at runtime.
VideoAdPlayer.VideoAdPlayerCallback.onError()
was notcalled when a player error happened during ad playback
(#1334).
NullPointerException
whenusing
data://
ad tag URIs(#700).
CommandButton.enabled
totrue
and ensure the valuecan stay false for controllers even if the associated command is
available.
CommandButton
that should be used instead ofcustom icon resources.
MediaSessionService.isPlaybackOngoing()
to let apps query whetherthe service needs to be stopped in
onTaskRemoved()
(#1219).
MediaSessionService.pauseAllPlayersAndStopSelf()
that convenientlyallows to pause playback of all sessions and call
stopSelf()
toterminate the lifecycle of the
MediaSessionService
.MediaSessionService.onTaskRemoved(Intent)
to provide a safedefault implementation that keeps the service running in the foreground
if playback is ongoing or stops the service otherwise.
the duration into the platform session metadata
(#1256).
MediaMetadata
toMediaDescriptionCompat
, to usethe same preferred order and logic when selecting metadata properties as
in media1.
MediaSession.sendError()
that allows sending non-fatal errors toMedia3 controller. When using the notification controller (see
MediaSession.getMediaNotificationControllerInfo()
), the custom erroris used to update the
PlaybackState
of the platform session to anerror state with the given error information
(#543).
MediaSession.Callback.onPlayerInteractionFinished()
to informsessions when a series of player interactions from a specific controller
finished.
SessionError
and use it inSessionResult
andLibraryResult
instead of the error code to provide more information about the error
and how to resolve the error if possible.
test interactions with apps publishing a media session.
MediaSession[Builder].setSessionExtras()
to a media1 controller'sPlaybackStateCompat.getExtras()
.PlaybackException
is mapped to a fatal error state of thePlaybackStateCompat
. ASessionError
sent to the media notificationcontroller with
MediaSession.sendError(ControllerInfo, SessionError)
is mapped to a non-fatal error in
PlaybackStateCompat
which means thaterror code and message are set but the state of the platform session
remains different to
STATE_ERROR
.global session activity. The session activity can be defined for a
controller at connection time by creating a
ConnectionResult
withAcceptedResultBuilder.setSessionActivivty(PendingIntent)
. Onceconnected, the session activity can be updated with
MediaSession.setSessionActivity(ControllerInfo, PendingIntent)
.MediaLibrarySession.Callback
.Error replication can now be configured by using
MediaLibrarySession.Builder.setLibraryErrorReplicationMode()
forchoosing the error type or opt-ing out of error replication which is on
by default.
PlayerView
when connected to anExoPlayer
(#1144).PlayerControlView
through xmlattributes to allow different drawables per
PlayerView
instance,rather than global overrides
(#1200).
SurfaceView
inside a ComposeAndroidView
on API 34(#1237).
DownloadHelper
does not leak unreleasedRenderer
instances, which can eventually result in an app crashing with
IllegalStateException: Too many receivers, total of 1000, registered for pid
(#1224).SocketTimeoutException
inCronetDataSource
. In some versions ofCronet, 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).
delegated in
HlsSampleStreamWrapper
with an incorrect offset causingan
IndexOutOfBoundsException
or anIllegalArgumentException
(#1002).
(#1240).
resulted in
Source Error
andIllegalArgumentException
.live playback (#1240).
ArrayIndexOutOfBoundsException
(#1395).
IndexOutOfBoundsException
(#1329).
dashif:Laurl
license urls(#1345).
MediaQueueItem
to theartist in the Media3 media item
(#1255).
onInit()
andonRelease()
inFakeRenderer
.TestPlayerRunHelper.runUntil()/playUntil()
methods to fail onnonfatal errors (e.g. those reported to
AnalyticsListener.onVideoCodecError()
). Use the newTestPlayerRunHelper.run(player).ignoringNonFatalErrors().untilXXX()
method chain to disable this behavior.
DefaultPreloadManager
in the short form demo app.Intent
arguments from command line(#1266).
HttpEngineDataSource
as theHttpDataSource
when supported by thedevice.
CronetDataSourceFactory
. UseCronetDataSource.Factory
instead.
DataSpec
constructors. UseDataSpec.Builder
instead.setContentTypePredicate(Predicate)
method fromDefaultHttpDataSource
,OkHttpDataSource
andCronetDataSource
. Usethe equivalent method on each
XXXDataSource.Factory
instead.OkHttpDataSource
constructors andOkHttpDataSourceFactory
.Use
OkHttpDataSource.Factory
instead.PlayerMessage.setHandler(Handler)
. UsesetLooper(Looper)
instead.
Timeline.Window.isLive
field. Use theisLive()
methodinstead.
DefaultHttpDataSource
constructors. UseDefaultHttpDataSource.Factory
instead.DashMediaSource.DEFAULT_LIVE_PRESENTATION_DELAY_MS
. UseDashMediaSource.DEFAULT_FALLBACK_TARGET_LIVE_OFFSET_MS
instead.MediaCodecInfo.isSeamlessAdaptationSupported(Format, Format, boolean)
. UseMediaCodecInfo.canReuseCodec(Format, Format)
instead.DrmSessionManager.DUMMY
andgetDummyDrmSessionManager()
method. Use
DrmSessionManager.DRM_UNSUPPORTED
instead.AnalyticsListener.onAudioInputFormatChanged(EventTime, Format)
,AnalyticsListener.onVideoInputFormatChanged(EventTime, Format)
,AudioRendererEventListener.onAudioInputFormatChanged(Format)
,VideoRendererEventListener.onVideoInputFormatChanged(Format)
. Use theoverloads that take a
DecoderReuseEvaluation
instead.RendererSupport.FormatSupport
IntDef andFORMAT_HANDLED
,FORMAT_EXCEEDS_CAPABILITIES
,FORMAT_UNSUPPORTED_DRM
,FORMAT_UNSUPPORTED_SUBTYPE
,FORMAT_UNSUPPORTED_TYPE
constants. Usethe equivalent IntDef and constants in
androidx.media3.common.C
instead (e.g.
C.FORMAT_HANDLED
).Bundleable
interface. This includes removing allBundleable.Creator<Foo> CREATOR
constant fields. Callers should usethe
Bundle toBundle()
andstatic Foo fromBundle(Bundle)
methods oneach type instead.
Configuration
📅 Schedule: Branch creation - "on sunday" (UTC), 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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.