- 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, use
DownloadManager.addListener
to register a listener directly to theDownloadManager
returned throughDownloadService.getDownloadManager
. - Remove
Player.getCurrentStaticMetadata
,Player.Listener.onStaticMetadataChanged
and
Player.EVENT_STATIC_METADATA_CHANGED
. UsePlayer.getMediaMetadata
,Player.Listener.onMediaMetadataChanged
and
Player.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