Update dependency com.google.android.exoplayer:exoplayer-ui to v2.18.1
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
com.google.android.exoplayer:exoplayer-ui | dependencies | minor |
2.14.2 -> 2.18.1
|
Release Notes
google/ExoPlayer
v2.18.1
This release corresponds to the AndroidX media3 1.0.0-beta02 release.
- Core library:
- Ensure that changing the
ShuffleOrder
withExoPlayer.setShuffleOrder
results in a call toPlayer.Listener#onTimelineChanged
withreason=Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED
(#9889). - For progressive media, only include selected tracks in buffered position (#10361).
- Allow custom logger for all ExoPlayer log output (#9752).
- Fix implementation of
setDataSourceFactory
inDefaultMediaSourceFactory
, which was non-functional in some cases (#116).
- Ensure that changing the
- Extractors:
- DASH:
- Parse ClearKey license URL from manifests (#10246).
- UI:
- Ensure TalkBack announces the currently active speed option in the playback controls menu (#10298).
- RTSP:
- Add VP8 fragmented packet handling (#110).
- Leanback extension:
- Listen to
playWhenReady
changes inLeanbackAdapter
(10420).
- Listen to
- Cast:
v2.18.0
This release corresponds to the AndroidX media3 1.0.0-beta01 release.
- Core library:
- Enable support for Android platform diagnostics via
MediaMetricsManager
. ExoPlayer will forward playback events and performance 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 ExoPlayer withExoPlayer.Builder.setUsePlatformDiagnostics(false)
. - Fix bug that tracks are reset too often when using
MergingMediaSource
, for example when side-loading subtitles and changing the selected subtitle mid-playback (#10248). - Stop detecting 5G-NSA network type on API 29 and 30. These playbacks will assume a 4G network.
- Disallow passing
null
toMediaSource.Factory.setDrmSessionManagerProvider
andMediaSource.Factory.setLoadErrorHandlingPolicy
. Instances ofDefaultDrmSessionManagerProvider
andDefaultLoadErrorHandlingPolicy
can be passed explicitly if required. - Add
MediaItem.RequestMetadata
to represent metadata needed to play media when the exactLocalConfiguration
is not known. Also removeMediaMetadata.mediaUrl
as this is now included inRequestMetadata
. - Add
Player.Command.COMMAND_SET_MEDIA_ITEM
to enable players to allow setting a single item.
- Enable support for Android platform diagnostics via
- Track selection:
- Flatten
TrackSelectionOverrides
class intoTrackSelectionParameters
, and promoteTrackSelectionOverride
to a top level class. - Rename
TracksInfo
toTracks
andTracksInfo.TrackGroupInfo
toTracks.Group
.Player.getCurrentTracksInfo
andPlayer.Listener.onTracksInfoChanged
have also been renamed toPlayer.getCurrentTracks
andPlayer.Listener.onTracksChanged
. This includes 'un-deprecating' thePlayer.Listener.onTracksChanged
method name, but with different parameter types. - Change
DefaultTrackSelector.buildUponParameters
andDefaultTrackSelector.Parameters.buildUpon
to returnDefaultTrackSelector.Parameters.Builder
instead of the deprecatedDefaultTrackSelector.ParametersBuilder
. - Add
DefaultTrackSelector.Parameters.constrainAudioChannelCountToDeviceCapabilities
which is enabled by default. When enabled, theDefaultTrackSelector
will prefer audio tracks whose channel count does not exceed the device output capabilities. On handheld devices, theDefaultTrackSelector
will prefer stereo/mono over multichannel audio formats, unless the multichannel format can be Spatialized (Android 12L+) or is a Dolby surround sound format. In addition, on devices that support audio spatialization, theDefaultTrackSelector
will monitor for changes in the Spatializer properties and trigger a new track selection upon these. Devices with atelevision
UI mode are excluded from these constraints and the format with the highest channel count will be preferred. To enable this feature, theDefaultTrackSelector
instance must be constructed with aContext
.
- Flatten
- Video:
- Rename
DummySurface
toPlaceholderSurface
. - Add AV1 support to the
MediaCodecVideoRenderer.getCodecMaxInputSize
.
- Rename
- Audio:
- Use LG AC3 audio decoder advertising non-standard MIME type.
- Change the return type of
AudioAttributes.getAudioAttributesV21()
fromandroid.media.AudioAttributes
to a newAudioAttributesV21
wrapper class, to prevent slow ART verification on API < 21. - Query the platform (API 29+) or assume the audio encoding channel count for audio passthrough when the format audio channel count is unset, which occurs with HLS chunkless preparation (10204).
- Configure
AudioTrack
with channel maskAudioFormat.CHANNEL_OUT_7POINT1POINT4
if the decoder outputs 12 channel PCM audio (#10322.
- DRM
- Ensure the DRM session is always correctly updated when seeking immediately after a format change (10274).
- Text:
- Change
Player.getCurrentCues()
to returnCueGroup
instead ofList<Cue>
. - SSA: Support
OutlineColour
style setting whenBorderStyle == 3
(i.e.OutlineColour
sets the background of the cue) (#8435). - CEA-708: Parse data into multiple service blocks and ignore blocks not associated with the currently selected service number.
- Remove
RawCcExtractor
, which was only used to handle a Google-internal subtitle format.
- Change
- Extractors:
- UI:
- Fix delivery of events to
OnClickListener
s set onStyledPlayerView
andPlayerView
, in the case thatuseController=false
(#9605). Also fix delivery of events toOnLongClickListener
for all view configurations. - Fix incorrectly treating a sequence of touch events that exit the bounds
of
StyledPlayerView
andPlayerView
beforeACTION_UP
as a click (#9861). - Fix
PlayerView
accessibility issue where tapping might toggle playback rather than hiding the controls (#8627). - Rewrite
TrackSelectionView
andTrackSelectionDialogBuilder
to work with thePlayer
interface rather thanExoPlayer
. This allows the views to be used with otherPlayer
implementations, and removes the dependency from the UI module to the ExoPlayer module. This is a breaking change. - Don't show forced text tracks in the
PlayerView
track selector, and keep a suitable forced text track selected if "None" is selected (#9432).
- Fix delivery of events to
- DASH:
- Parse channel count from DTS
AudioChannelConfiguration
elements. This re-enables audio passthrough for DTS streams (#10159). - Disallow passing
null
toDashMediaSource.Factory.setCompositeSequenceableLoaderFactory
. Instances ofDefaultCompositeSequenceableLoaderFactory
can be passed explicitly if required.
- Parse channel count from DTS
- HLS:
- Fallback to chunkful preparation if the playlist CODECS attribute does not contain the audio codec (#10065).
- Disallow passing
null
toHlsMediaSource.Factory.setCompositeSequenceableLoaderFactory
,HlsMediaSource.Factory.setPlaylistParserFactory
, andHlsMediaSource.Factory.setPlaylistTrackerFactory
. Instances ofDefaultCompositeSequenceableLoaderFactory
,DefaultHlsPlaylistParserFactory
, or a reference toDefaultHlsPlaylistTracker.FACTORY
can be passed explicitly if required.
- Smooth Streaming:
- Disallow passing
null
toSsMediaSource.Factory.setCompositeSequenceableLoaderFactory
. Instances ofDefaultCompositeSequenceableLoaderFactory
can be passed explicitly if required.
- Disallow passing
- RTSP:
- Add RTP reader for H263 (#63).
- Add RTP reader for MPEG4 (#35).
- Add RTP reader for HEVC (#36).
- Add RTP reader for AMR. Currently only mono-channel, non-interleaved AMR streams are supported. Compound AMR RTP payload is not supported. (#46)
- Add RTP reader for VP8 (#47).
- Add RTP reader for WAV (#56).
- Fix RTSP basic authorization header. (#9544).
- Stop checking mandatory SDP fields as ExoPlayer doesn't need them (#10049).
- Throw checked exception when parsing RTSP timing (#10165).
- Add RTP reader for VP9 (#47).
- Add RTP reader for OPUS (#53).
- Data sources:
- Rename
DummyDataSource
toPlaceholderDataSource
. - Workaround OkHttp interrupt handling.
- Rename
- Ad playback / IMA:
- Decrease ad polling rate from every 100ms to every 200ms, to line up with Media Rating Council (MRC) recommendations.
- FFmpeg extension:
- Update CMake version to
3.21.0+
to avoid a CMake bug causing AndroidStudio's gradle sync to fail (#9933).
- Update CMake version to
- Remove deprecated symbols:
- Remove
Player.Listener.onTracksChanged(TrackGroupArray, TrackSelectionArray)
. UsePlayer.Listener.onTracksChanged(Tracks)
instead. - Remove
Player.getCurrentTrackGroups
andPlayer.getCurrentTrackSelections
. UsePlayer.getCurrentTracks
instead. You can also continue to useExoPlayer.getCurrentTrackGroups
andExoPlayer.getCurrentTrackSelections
, although these methods remain deprecated. - Remove
DownloadHelper
DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_VIEWPORT
andDEFAULT_TRACK_SELECTOR_PARAMETERS
constants. UsegetDefaultTrackSelectorParameters(Context)
instead when possible, andDEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_CONTEXT
otherwise. - Remove constructor
DefaultTrackSelector(ExoTrackSelection.Factory)
. UseDefaultTrackSelector(Context, ExoTrackSelection.Factory)
instead. - Remove
Transformer.Builder.setContext
. TheContext
should be passed to theTransformer.Builder
constructor instead.
- Remove
v2.17.1
This release corresponds to the AndroidX media3 1.0.0-alpha03 release.
- Audio:
- Fix error checking audio capabilities for Dolby Atmos (E-AC3-JOC) in HLS.
- Extractors:
- FMP4: Fix issue where emsg sample metadata could be output in the wrong order for streams containing both v0 and v1 emsg atoms (#9996).
- Text:
- Fix the interaction of
SingleSampleMediaSource.Factory.setTrackId
andMediaItem.SubtitleConfiguration.Builder.setId
to prioritise theSubtitleConfiguration
field and fall back to theFactory
value if it's not set (#10016).
- Fix the interaction of
- Ad playback:
- Fix audio underruns between ad periods in live HLS SSAI streams.
v2.17.0
This release corresponds to the AndroidX media3 1.0.0-alpha02 release.
- Core library:
- Sleep and retry when creating a
MediaCodec
instance fails. This works around an issue that occurs on some devices when switching a surface from a secure codec to another codec (#8696). - Add
MediaCodecAdapter.getMetrics()
to allow users obtain metrics data fromMediaCodec
. (#9766). - Fix Maven dependency resolution (#8353).
- Disable automatic speed adjustment for live streams that neither have low-latency features nor a user request setting the speed (#9329).
- Rename
DecoderCounters#inputBufferCount
toqueuedInputBufferCount
. - Make
SimpleExoPlayer.renderers
private. Renderers can be accessed viaExoPlayer.getRenderer
. - Updated some
AnalyticsListener.EventFlags
constant values to match values inPlayer.EventFlags
. - Split
AnalyticsCollector
into an interface and default implementation to allow it to be stripped by R8 if an app doesn't need it.
- Sleep and retry when creating a
- Track selection:
- Support preferred video role flags in track selection (#9402).
- Update video track selection logic to take preferred MIME types and role flags into account when selecting multiple video tracks for adaptation (#9519).
- Update video and audio track selection logic to only choose formats for adaptive selections that have the same level of decoder and hardware support (#9565).
- Update video track selection logic to prefer more efficient codecs if multiple codecs are supported by primary, hardware-accelerated decoders (#4835).
- Prefer audio content preferences (for example, the "default" audio track or a track matching the system locale language) over technical track selection constraints (for example, preferred MIME type, or maximum channel count).
- Prohibit duplicate
TrackGroup
s in aTrackGroupArray
.TrackGroup
s can always be made distinguishable by setting anid
in theTrackGroup
constructor. This fixes a crash when resuming playback after backgrounding the app with an active track override (#9718). - Amend logic in
AdaptiveTrackSelection
to allow a quality increase under sufficient network bandwidth even if playback is very close to the live edge (#9784).
- Video:
- Fix decoder fallback logic for Dolby Vision to use a compatible H264/H265 decoder if needed.
- Audio:
- Fix decoder fallback logic for Dolby Atmos (E-AC3-JOC) to use a compatible E-AC3 decoder if needed.
- Change
AudioCapabilities
APIs to require passing explicitlyAudioCapabilities.DEFAULT_AUDIO_CAPABILITIES
instead ofnull
. - Allow customization of the
AudioTrack
buffer size calculation by injecting anAudioTrackBufferSizeProvider
toDefaultAudioSink
(#8891). - Retry
AudioTrack
creation if the requested buffer size was > 1MB (#9712).
- Extractors:
- Fix incorrect parsing of H.265 SPS NAL units (#9719).
- Parse Vorbis Comments (including
METADATA_BLOCK_PICTURE
) in Ogg Opus and Ogg Vorbis files.
- Text:
- Add a
MediaItem.SubtitleConfiguration.id
field which is propagated to theFormat.id
field of the subtitle track created from the configuration (#9673). - Add basic support for WebVTT subtitles in Matroska containers (#9886).
- Prevent
Cea708Decoder
from reading more than the declared size of a service block.
- Add a
- DRM:
- Remove
playbackLooper
fromDrmSessionManager.(pre)acquireSession
. When aDrmSessionManager
is used by an app in a customMediaSource
, theplaybackLooper
needs to be passed toDrmSessionManager.setPlayer
instead.
- Remove
- Ad playback / IMA:
- Add support for IMA Dynamic Ad Insertion (DAI) (#8213).
- Add a method to
AdPlaybackState
to allow resetting an ad group so that it can be played again (#9615). - Enforce playback speed of 1.0 during ad playback (#9018).
- Fix issue where an ad group that failed to load caused an immediate playback reset (#9929).
- UI:
- DASH:
- HLS:
- Use chunkless preparation by default to improve start up time. If your
renditions contain muxed closed-caption tracks that are not declared
in the master playlist, you should add them to the master playlist to be
available for playback, or turn off chunkless preparation with
HlsMediaSource.Factory.setAllowChunklessPreparation(false)
. - Support key-frame accurate seeking in HLS (#2882).
- Correctly populate
Format.label
for audio only HLS streams (#9608).
- Use chunkless preparation by default to improve start up time. If your
renditions contain muxed closed-caption tracks that are not declared
in the master playlist, you should add them to the master playlist to be
available for playback, or turn off chunkless preparation with
- RTSP:
- Transformer:
- Increase required min API version to 21.
-
TransformationException
is now used to describe errors that occur during a transformation. - Add
TransformationRequest
for specifying the transformation options. - Allow multiple listeners to be registered.
- Fix Transformer being stuck when the codec output is partially read.
- Fix potential NPE in
Transformer.getProgress
when releasing the muxer throws. - Add a demo app for applying transformations.
- The transformer module is no longer included by depending on
com.google.android.exoplayer:exoplayer
. To continue using transformer, add an additional dependency oncom.google.android.exoplayer:exoplayer-transformer
.
- MediaSession extension:
- By default,
MediaSessionConnector
now clears the playlist on stop. Apps that want the playlist to be retained can callsetClearMediaItemsOnStop(false)
on the connector.
- By default,
- Cast extension:
- FFmpeg extension:
- Make
build_ffmpeg.sh
depend on LLVM's bin utils instead of GNU's (#9933).
- Make
- Android 12 compatibility:
- Upgrade the Cast extension to depend on
com.google.android.gms:play-services-cast-framework:20.1.0
. Earlier versions ofplay-services-cast-framework
are not compatible with apps targeting Android 12, and will crash with anIllegalArgumentException
when creatingPendingIntent
s (#9528).
- Upgrade the Cast extension to depend on
- Remove deprecated symbols:
- Remove
Player.EventListener
. UsePlayer.Listener
instead. - Remove
MediaSourceFactory.setDrmSessionManager
,MediaSourceFactory.setDrmHttpDataSourceFactory
, andMediaSourceFactory.setDrmUserAgent
. UseMediaSourceFactory.setDrmSessionManagerProvider
instead. - Remove
MediaSourceFactory.setStreamKeys
. UseMediaItem.Builder.setStreamKeys
instead. - Remove
MediaSourceFactory.createMediaSource(Uri)
. UseMediaSourceFactory.createMediaSource(MediaItem)
instead. - Remove
setTag
fromDashMediaSource
,HlsMediaSource
andSsMediaSource
. UseMediaItem.Builder.setTag
instead. - Remove
DashMediaSource.setLivePresentationDelayMs(long, boolean)
. UseMediaItem.Builder.setLiveConfiguration
andMediaItem.LiveConfiguration.Builder.setTargetOffsetMs
to override the manifest, orDashMediaSource.setFallbackTargetLiveOffsetMs
to provide a fallback value. - Remove
(Simple)ExoPlayer.setThrowsWhenUsingWrongThread
. Opting out of the thread enforcement is no longer possible. - Remove
ActionFile
andActionFileUpgradeUtil
. Use ExoPlayer 2.16.1 or before to useActionFileUpgradeUtil
to merge legacy action files intoDefaultDownloadIndex
. - Remove
ProgressiveMediaSource.setExtractorsFactory
. UseProgressiveMediaSource.Factory(DataSource.Factory, ExtractorsFactory)
constructor instead. - Remove
ProgressiveMediaSource.Factory.setTag
andProgressiveMediaSource.Factory.setCustomCacheKey
. UseMediaItem.Builder.setTag
andMediaItem.Builder.setCustomCacheKey
instead. - Remove
DefaultRenderersFactory(Context, @​ExtensionRendererMode int)
andDefaultRenderersFactory(Context, @​ExtensionRendererMode int, long)
constructors. Use theDefaultRenderersFactory(Context)
constructor,DefaultRenderersFactory.setExtensionRendererMode
, andDefaultRenderersFactory.setAllowedVideoJoiningTimeMs
instead. - Remove all public
CronetDataSource
constructors. UseCronetDataSource.Factory
instead.
- Remove
- Change the following
IntDefs
to@Target(TYPE_USE)
only. This may break the compilation of usages in Kotlin, which can be fixed by moving the annotation to annotate the type (Int
).@AacAudioObjectType
@Ac3Util.SyncFrameInfo.StreamType
@AdLoadException.Type
@AdtsExtractor.Flags
@AmrExtractor.Flags
@AspectRatioFrameLayout.ResizeMode
@AudioFocusManager.PlayerCommand
@AudioSink.SinkFormatSupport
@BinarySearchSeeker.TimestampSearchResult.Type
@BufferReplacementMode
@C.BufferFlags
@C.ColorRange
@C.ColorSpace
@C.ColorTransfer
@C.CryptoMode
@C.Encoding
@C.PcmEncoding
@C.Projection
@C.SelectionReason
@C.StereoMode
@C.VideoOutputMode
@CacheDataSource.Flags
@CaptionStyleCompat.EdgeType
@DataSpec.Flags
@DataSpec.HttpMethods
@DecoderDiscardReasons
@DecoderReuseResult
@DefaultAudioSink.OutputMode
@DefaultDrmSessionManager.Mode
@DefaultTrackSelector.SelectionEligibility
@DefaultTsPayloadReaderFactory.Flags
@EGLSurfaceTexture.SecureMode
@EbmlProcessor.ElementType
@ExoMediaDrm.KeyRequest.RequestType
@ExtensionRendererMode
@Extractor.ReadResult
@FileTypes.Type
-
@FlacExtractor.Flags
(incom.google.android.exoplayer2.ext.flac
package) -
@FlacExtractor.Flags
(incom.google.android.exoplayer2.extractor.flac
package) @FragmentedMp4Extractor.Flags
@HlsMediaPlaylist.PlaylistType
@HttpDataSourceException.Type
@IllegalClippingException.Reason
@IllegalMergeException.Reason
@LoadErrorHandlingPolicy.FallbackType
@MatroskaExtractor.Flags
@Mp3Extractor.Flags
@Mp4Extractor.Flags
@NotificationUtil.Importance
@PlaybackException.FieldNumber
@PlayerNotificationManager.Priority
@PlayerNotificationManager.Visibility
@PlayerView.ShowBuffering
@Renderer.State
@RendererCapabilities.AdaptiveSupport
@RendererCapabilities.Capabilities
@RendererCapabilities.DecoderSupport
@RendererCapabilities.FormatSupport
@RendererCapabilities.HardwareAccelerationSupport
@RendererCapabilities.TunnelingSupport
@SampleStream.ReadDataResult
@SampleStream.ReadFlags
@StyledPlayerView.ShowBuffering
@SubtitleView.ViewType
@TextAnnotation.Position
@TextEmphasisSpan.MarkFill
@TextEmphasisSpan.MarkShape
@Track.Transformation
@TrackOutput.SampleDataPart
@Transformer.ProgressState
@TsExtractor.Mode
@TsPayloadReader.Flags
@WebvttCssStyle.FontSizeUnit
v2.16.1
- Core Library:
- Fix track selection issue where overriding one track group did not disable other track groups of the same type (#9675).
- Fix track selection issue where a mixture of non-empty and empty track overrides is not applied correctly (#9649).
- Add protected method
DefaultRenderersFactory.getCodecAdapterFactory()
so that subclasses ofDefaultRenderersFactory
that overridebuildVideoRenderers()
orbuildAudioRenderers()
can access the codec adapter factory and pass it toMediaCodecRenderer
instances they create. - Propagate ICY header fields
name
andgenre
toMediaMetadata.station
andMediaMetadata.genre
respectively so that they reach the app viaPlayer.Listener.onMediaMetadataChanged()
(#9677). - Remove null keys from
DefaultHttpDataSource#getResponseHeaders
.
- Extractors:
- WAV: Add support for RF64 streams (#9543).
- DASH:
- Add parsed essential and supplemental properties to the
Representation
(#9579).
- Add parsed essential and supplemental properties to the
- HLS:
- Correctly populate
Format.label
for audio only HLS streams (#9608).
- Correctly populate
v2.16.0
- Core Library:
- Deprecate
SimpleExoPlayer
. All functionality has been moved toExoPlayer
instead.ExoPlayer.Builder
can be used instead ofSimpleExoPlayer.Builder
. - Add track selection methods to the
Player
interface, for example,Player.getCurrentTracksInfo
andPlayer.setTrackSelectionParameters
. These methods can be used instead of directly accessing the track selector. - Enable MediaCodec asynchronous queueing by default on devices with API
level >= 31. Add methods in
DefaultMediaCodecRendererFactory
andDefaultRenderersFactory
to force enable or force disable asynchronous queueing (6348). - Remove final dependency on
jcenter()
. - Fix
mediaMetadata
being reset when media is repeated (#9458). - Adjust
ExoPlayer
MediaMetadata
update priority, such that values input through theMediaItem.MediaMetadata
are used above media derived values. - Move
com.google.android.exoplayer2.device.DeviceInfo
tocom.google.android.exoplayer2.DeviceInfo
. - Move
com.google.android.exoplayer2.drm.DecryptionException
tocom.google.android.exoplayer2.decoder.CryptoException
. - Move
com.google.android.exoplayer2.upstream.cache.CachedRegionTracker
tocom.google.android.exoplayer2.upstream.CachedRegionTracker
. - Move
Player.addListener(EventListener)
andPlayer.removeListener(EventListener)
out ofPlayer
into subclasses.
- Deprecate
- Android 12 compatibility:
- Keep
DownloadService
started and in the foreground whilst waiting for requirements to be met on Android 12. This is necessary due to new foreground service launch restrictions.DownloadService.getScheduler
will not be called on Android 12 devices. - Disable platform transcoding when playing content URIs on Android 12.
- Add
ExoPlayer.setVideoChangeFrameRateStrategy
to allow disabling of calls from the player toSurface.setFrameRate
. This is useful for applications wanting to callSurface.setFrameRate
directly from application code with Android 12'sSurface.CHANGE_FRAME_RATE_ALWAYS
. - Upgrade the WorkManager extension to depend on
androidx.work:work-runtime:2.7.0
. Earlier versions ofwork-runtime
are not compatible with apps targeting Android 12, and will crash with anIllegalArgumentException
when creatingPendingIntent
s (#9181).
- Keep
- Video:
- Fix bug in
MediaCodecVideoRenderer
that resulted in re-using a releasedSurface
when playing without an app-providedSurface
(#9476).
- Fix bug in
- DRM:
- Log an error (instead of throwing
IllegalStateException
) when callingDefaultDrmSession#release()
on a fully released session (#9392).
- Log an error (instead of throwing
- UI:
- Extractors:
- MP4: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
- MP4: Add support for Dolby TrueHD (only for unfragmented streams) (#9496).
- MP4: Avoid throwing
ArrayIndexOutOfBoundsException
when parsing invalidcolr
boxes produced by some device cameras (#9332). - MP4: Parse HDR static metadata from the
clli
andmdcv
boxes. - TS: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
- TS: Map stream type 0x80 to H262 (#9472).
- Downloads and caching:
- Modify
DownloadService
behavior whenDownloadService.getScheduler
returnsnull
, or returns aScheduler
that does not support the requirements for downloads to continue. In both cases,DownloadService
will now remain started and in the foreground whilst waiting for requirements to be met. - Modify
DownloadService
behavior when running on Android 12 and above. See the "Android 12 compatibility" section above.
- Modify
- RTSP:
- Support RFC4566 SDP attribute field grammar (#9430).
- DASH:
- Populate
Format.sampleMimeType
,width
andheight
for imageAdaptationSet
elements (#9500).
- Populate
- HLS:
- RTMP extension:
- Upgrade to
io.antmedia:rtmp_client
, which does not rely onjcenter()
(#9591).
- Upgrade to
- MediaSession extension:
- Rename
MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged
toonCurrentMediaItemIndexChanged
.
- Rename
- Transformer:
- Avoid sending a duplicate timestamp to the encoder with the end of stream buffer.
- Remove deprecated symbols:
- Remove
Renderer.VIDEO_SCALING_MODE_*
constants. Use identically named constants inC
instead. - Remove
C.MSG_*
constants. Use identically named constants inRenderer
instead, except forC.MSG_SET_SURFACE
, which is replaced withRenderer.MSG_SET_VIDEO_OUTPUT
. - Remove
DeviceListener
. UsePlayer.Listener
instead. - Remove
CacheDataSourceFactory
. UseCacheDataSource.Factory
instead. - Remove
CacheDataSinkFactory
. UseCacheDataSink.Factory
instead. - Remove
FileDataSourceFactory
. UseFileDataSource.Factory
instead. - Remove
SimpleExoPlayer.addMetadataOutput
andremoveMetadataOutput
. UsePlayer.addListener
andPlayer.Listener
instead. - Remove
SimpleExoPlayer.addAudioListener
,removeAudioListener
andAudioListener
. UsePlayer.addListener
andPlayer.Listener
instead. - Remove
SimpleExoPlayer.addVideoListener
,removeVideoListener
andVideoListener
. UsePlayer.addListener
andPlayer.Listener
instead. - Remove
DefaultHttpDataSourceFactory
. UseDefaultHttpDataSource.Factory
instead. - Remove
SingleSampleMediaSource.createMediaSource(Uri, Format, long)
. UseSingleSampleMediaSource.createMediaSource(MediaItem.Subtitle, long)
instead. - Remove
HttpDataSource.Factory.getDefaultRequestProperties
. UseHttpDataSource.Factory.setDefaultRequestProperties
instead. - Remove
GvrAudioProcessor
and the GVR extension, which has been deprecated since 2.11.0. - Remove
DownloadService.onDownloadChanged
andDownloadService.onDownloadRemoved
. Instead, useDownloadManager.addListener
to register a listener directly to theDownloadManager
returned throughDownloadService.getDownloadManager
. - Remove
Player.getCurrentStaticMetadata
,Player.Listener.onStaticMetadataChanged
andPlayer.EVENT_STATIC_METADATA_CHANGED
. UsePlayer.getMediaMetadata
,Player.Listener.onMediaMetadataChanged
andPlayer.EVENT_MEDIA_METADATA_CHANGED
for convenient access to structured metadata, or access the raw static metadata directly from theTrackSelection#getFormat()
. - Remove
ControlDispatcher
andDefaultControlDispatcher
. Operations can be customized by using aForwardingPlayer
, or when configuring the player (for example by usingExoPlayer.Builder.setSeekBackIncrementMs
).
- Remove
v2.15.1
- Core Library:
- Fix track selection in
StyledPlayerControlView
when usingForwardingPlayer
. - Fix
FlagSet#equals
on API levels below 24. - Fix
NullPointerException
being thrown fromCacheDataSource
when reading a fully cached resource withDataSpec.position
equal to the resource length. - Fix a bug when depending on ExoPlayer locally with a relative path (#9403).
- Better handle invalid seek requests. Seeks to positions that are before the start or after the end of the media are now handled as seeks to the start and end respectively (8906).
- Rename
MimeTypes.AUDIO_DTS_UHD
toMimeTypes.AUDIO_DTS_X
and add required profile to its value (#9429).
- Fix track selection in
- Extractors:
- Video:
- Request smaller decoder input buffers for Dolby Vision. This fixes an issue that could cause UHD Dolby Vision playbacks to fail on some devices, including Amazon Fire TV 4K.
- DRM:
- Fix
DefaultDrmSessionManager
to correctly eagerly release preacquired DRM sessions when there's a shortage of DRM resources on the device.
- Fix
- Downloads and caching:
- Workaround platform issue that can cause a
SecurityException
to be thrown fromRequirements.isInternetConnectivityValidated
on devices running Android 11 (#9002).
- Workaround platform issue that can cause a
- DASH:
- Use identical cache keys for downloading and playing DASH segments (#9370).
- Fix base URL selection and load error handling when base URLs are shared across adaptation sets.
- HLS:
- Fix bug where the player would get stuck if all download attempts fail and would not raise an error to the application (#9390).
- RTSP:
- UI:
- Cast extension:
- Implement
CastPlayer.setPlaybackParameters(PlaybackParameters)
to support setting the playback speed (#6784).
- Implement
v2.15.0
- Core Library:
- Add
MediaCodecAdapter.needsReconfiguration
method. - Add
getSeekBackIncrement
,seekBack
,getSeekForwardIncrement
,seekForward
,getMaxSeekToPreviousPosition
,seekToPrevious
andseekToNext
methods toPlayer
. - Rename
Player
methods:-
hasPrevious
tohasPreviousWindow
. -
previous
toseekToPreviousWindow
. -
hasNext
tohasNextWindow
. -
next
toseekToNextWindow
.
-
- Rename
Player
commands:-
COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM
toCOMMAND_SEEK_IN_CURRENT_WINDOW
. -
COMMAND_SEEK_TO_NEXT_MEDIA_ITEM
toCOMMAND_SEEK_TO_NEXT_WINDOW
. -
COMMAND_SEEK_TO_MREVIOUS_MEDIA_ITEM
toCOMMAND_SEEK_TO_MREVIOUS_WINDOW
. -
COMMAND_SEEK_TO_MEDIA_ITEM
toCOMMAND_SEEK_TO_WINDOW
. -
COMMAND_GET_MEDIA_ITEMS
toCOMMAND_GET_TIMELINE
.
-
- Rename
Player.EventFlags
IntDef toPlayer.Event
. - Make
Player
depend on the newPlaybackException
class instead ofExoPlaybackException
:-
Player.getPlayerError
now returns aPlaybackException
. -
Player.Listener.onPlayerError
now receives aPlaybackException
. - Add a new listener method
Player.Listener.onPlayerErrorChanged
, which is equivalent toonPlayerError
except that it is also called when the player error becomesnull
. -
Player
implementations likeExoPlayer
may usePlaybackException
subclasses (likeExoPlaybackException
), so users can downcast thePlaybackException
instance to obtain implementation-specific fields (likeExoPlaybackException.rendererIndex
).
-
-
PlaybackException
introduces anerrorCode
which identifies the cause of the failure in order to simplify error handling (#1611). - Add a
DefaultMediaDescriptionAdapter
for thePlayerNotificationManager
, that makes use of thePlayer
MediaMetadata
to populate the notification fields. - Add
@FallbackType
toLoadErrorHandlingPolicy
to support customization of the exclusion duration for locations and tracks. - Change interface of
LoadErrorHandlingPolicy
to support configuring the behavior of track and location fallback. Location fallback is currently only supported for DASH manifests with multiple base URLs. - Restrict use of
AudioTrack.isDirectPlaybackSupported
to TVs, to avoid listing audio offload encodings as supported for passthrough mode on mobile devices (#9239).
- Add
- Extractors:
- Add support for DTS-UHD in MP4 (#9163).
- Text:
- TTML: Inherit the
rubyPosition
value from a containing<span ruby="container">
element. - WebVTT: Add support for CSS
font-size
property (#8964).
- TTML: Inherit the
- Ad playback:
- Support changing ad break positions in the player logic (#5067).
- Support resuming content with an offset after an ad group.
- UI:
- Add
setUseRewindAction
andsetUseFastForwardAction
toPlayerNotificationManager
, andsetUseFastForwardActionInCompactView
andsetUseRewindActionInCompactView
to show the actions in compact view mode. - Remove
rewind_increment
andfastforward_increment
attributes fromPlayerControlView
andStyledPlayerControlView
. These increments can be customized by configuring thePlayer
(seesetSeekBackIncrementMs
andsetSeekForwardIncrementMs
inSimpleExoPlayer.Builder
), or by using aForwardingPlayer
that overridesgetSeekBackIncrement
,seekBack
,getSeekForwardIncrement
andseekForward
. The rewind and fast forward buttons can be disabled by using aForwardingPlayer
that removesCOMMAND_SEEK_BACK
andCOMMAND_SEEK_FORWARD
from the available commands. - Update
DefaultControlDispatcher
getRewindIncrementMs
andgetFastForwardIncrementMs
to take the player as parameter.
- Add
- DASH:
- HLS:
- RTSP:
- SmoothStreaming:
- Propagate
StreamIndex
elementName
attribute value asFormat
label (#9252).
- Propagate
- Cronet extension:
- Add
CronetDataSource.Factory.setRequestPriority
to allow setting the priority of requests made byCronetDataSource
instances.
- Add
- OkHttp extension:
- Switch to OkHttp 4.9.1. This increases the extension's minimum SDK version requirement from 16 to 21.
- Remove deprecated symbols:
- Remove
CastPlayer
specific playlist manipulation methods. UsesetMediaItems
,addMediaItems
,removeMediaItem
andmoveMediaItem
instead. - Remove
Format.create
methods. UseFormat.Builder
instead. - Remove
MediaSource.getTag
. UseMediaSource.getMediaItem
andMediaItem.PlaybackProperties.tag
instead. - Remove
PlaybackPreparer
. UI components that previously hadsetPlaybackPreparer
methods will now callPlayer.prepare
by default. If this behavior is sufficient, use ofPlaybackPreparer
can be removed from application code without replacement. For custom preparation logic, use aForwardingPlayer
that implements custom preparation logic inprepare
. - Remove
Player.Listener.onTimelineChanged(Timeline, Object, int)
. UsePlayer.Listener.onTimelineChanged(Timeline, int)
instead. The manifest can be accessed usingPlayer.getCurrentManifest
. - Remove
Player.getCurrentTag
. UsePlayer.getCurrentMediaItem
andMediaItem.PlaybackProperties.tag
instead. - Remove
Player.getPlaybackError
. UsePlayer.getPlayerError
instead. - Remove
PlayerNotificationManager
constructors andcreateWith
methods. UsePlayerNotificationManager.Builder
instead. - Remove
PlayerNotificationManager.setNotificationListener
. UsePlayerNotificationManager.Builder.setNotificationListener
instead. - Remove
PlayerNotificationManager
setUseNavigationActions
andsetUseNavigationActionsInCompactView
. UsesetUseNextAction
,setUsePreviousAction
,setUseNextActionInCompactView
andsetUsePreviousActionInCompactView
instead. - Remove
setRewindIncrementMs
andsetFastForwardIncrementMs
from UI components. These increments can be customized by configuring thePlayer
(seesetSeekBackIncrementMs
andsetSeekForwardIncrementMs
inSimpleExoPlayer.Builder
), or by using aForwardingPlayer
that overridesgetSeekBackIncrement
,seekBack
,getSeekForwardIncrement
andseekForward
. The rewind and fast forward buttons can be disabled by using aForwardingPlayer
that removesCOMMAND_SEEK_BACK
andCOMMAND_SEEK_FORWARD
from the available commands. - Remove
Timeline.getWindow(int, Window, boolean)
. UseTimeline.getWindow(int, Window)
instead, which will always set tags.
- Remove
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.