- Core Library:
- Move
Player
components toExoPlayer
. For examplePlayer.VideoComponent
is nowExoPlayer.VideoComponent
. - The most used methods of
Player
's audio, video, text and metadata components have been added directly toPlayer
. - Add
Player.getAvailableCommands
,Player.isCommandAvailable
andListener.onAvailableCommandsChanged
to query which commands that can be executed on the player. - Add a
Player.Listener
interface to receive all player events. Component listeners andEventListener
have been deprecated. - Add
Player.getMediaMetadata
, which returns a combined and structuredMediaMetadata
object. Changes to metadata are reported toListener.onMediaMetadataChanged
. Player.setPlaybackParameters
no longer accepts null, usePlaybackParameters.DEFAULT
instead.- Report information about the old and the new playback positions to
Listener.onPositionDiscontinuity
. AddDISCONTINUITY_REASON_SKIP
andDISCONTINUITY_REASON_REMOVE
as discontinuity reasons, and renameDISCONTINUITY_REASON_PERIOD_TRANSITION
toDISCONTINUITY_REASON_AUTO_TRANSITION
. RemoveDISCONTINUITY_REASON_AD_INSERTION
, for whichDISCONTINUITY_REASON_AUTO_TRANSITION
is used instead (#6163, #4768). - Deprecate
ExoPlayer.Builder
. UseSimpleExoPlayer.Builder
instead. - Move
Player.getRendererCount
andPlayer.getRendererType
toExoPlayer
. - Use an empty string instead of the URI if the media ID is not explicitly
set with
MediaItem.Builder.setMediaId(String)
. - Remove
MediaCodecRenderer.configureCodec()
and addMediaCodecRenderer.getMediaCodecConfiguration()
. The new method is called just before theMediaCodec
is created and returns the parameters needed to create and configure theMediaCodec
instance. Applications can overrideMediaCodecRenderer.onCodecInitialized()
to be notified after aMediaCodec
is initialized, or they can inject a customMediaCodecAdapter.Factory
if they want to control how theMediaCodec
is configured. - Promote
AdaptiveTrackSelection.AdaptationCheckpoint
topublic
visibility to allow Kotlin subclasses ofAdaptiveTrackSelection.Factory
(#8830). - Fix bug when transitions from content to ad periods called
onMediaItemTransition
by mistake. AdsLoader.AdViewProvider
andAdsLoader.OverlayInfo
have been renamedcom.google.android.exoplayer2.ui.AdViewProvider
andcom.google.android.exoplayer2.ui.AdOverlayInfo
respectively.CaptionStyleCompat
has been moved to thecom.google.android.exoplayer2.ui
package.DebugTextViewHelper
has been moved from theui
package to theutil
package.
- Move
- RTSP:
- Initial support for RTSP playbacks (#55).
- Downloads and caching:
- Fix
CacheWriter
to correctly handle cases where the requestDataSpec
extends beyond the end of the underlying resource. Caching will now succeed in this case, with data up to the end of the resource being cached. This behaviour is enabled by default, and so theallowShortContent
parameter has been removed (#7326). - Fix
CacheWriter
to correctly handleDataSource.close
failures, for which it cannot be assumed that data was successfully written to the cache.
- Fix
- DRM:
- Prepare DRM sessions (and fetch keys) ahead of the playback position (#4133).
- Only dispatch DRM session acquire and release events once per period when playing content that uses the same encryption keys for both audio & video tracks. Previously, separate acquire and release events were dispatched for each track in each period.
- Include the session state in DRM session-acquired listener methods.
- UI:
- Add
PlayerNotificationManager.Builder
, with the ability to specify which group the notification should belong to. - Remove
setUseSensorRotation
fromPlayerView
andStyledPlayerView
. Instead, cast the view returned bygetVideoSurfaceView
toSphericalGLSurfaceView
, and then callsetUseSensorRotation
on theSphericalGLSurfaceView
directly.
- Add
- Analytics:
- Add
onAudioCodecError
andonVideoCodecError
toAnalyticsListener
.
- Add
- Video:
- Add
Player.getVideoSize()
to retrieve the current size of the video stream. AddListener.onVideoSizeChanged(VideoSize)
and deprecateListener.onVideoSizeChanged(int, int, int, float)
.
- Add
- Audio:
- Report unexpected audio discontinuities to
AnalyticsListener.onAudioSinkError
(#6384). - Allow forcing offload for gapless content even if gapless playback is not supported.
- Allow fall back from DTS-HD to DTS when playing via passthrough.
- Report unexpected audio discontinuities to
- Text:
- Fix overlapping lines when using
SubtitleView.VIEW_TYPE_WEB
. - Parse SSA/ASS underline & strikethrough info in
Style:
lines (#8435). - Ensure TTML
tts:textAlign
is correctly propagated from<p>
nodes to child nodes. - Support TTML
ebutts:multiRowAlign
attributes.
- Fix overlapping lines when using
- Allow the use of Android platform extractors through
MediaParser.
Only supported on API 30+.
- You can use platform extractors for progressive media by passing
MediaParserExtractorAdapter.FACTORY
when creating aProgressiveMediaSource.Factory
. - You can use platform extractors for HLS by passing
MediaParserHlsMediaChunkExtractor.FACTORY
when creating aHlsMediaSource.Factory
. - You can use platform extractors for DASH by passing a
DefaultDashChunkSource
that usesMediaParserChunkExtractor.FACTORY
when creating aDashMediaSource.Factory
.
- You can use platform extractors for progressive media by passing
- Cast extension:
- Trigger
onMediaItemTransition
event for all reasons exceptMEDIA_ITEM_TRANSITION_REASON_REPEAT
.
- Trigger
- MediaSession extension:
- Remove dependency on
exoplayer-core
, relying onlyexoplayer-common
instead. To achieve this,TimelineQueueEditor
uses a newMediaDescriptionConverter
interface, and no longer relies onConcatenatingMediaSource
.
- Remove dependency on
- Remove deprecated symbols:
- Remove
ExoPlayerFactory
. UseSimpleExoPlayer.Builder
instead. - Remove
Player.DefaultEventListener
. UsePlayer.Listener
instead. - Remove
ExtractorMediaSource
. UseProgressiveMediaSource
instead. - Remove
DefaultMediaSourceEventListener
. UseMediaSourceEventListener
instead. - Remove
DashManifest
constructor. Use the remaining constructor withprogramInformation
andserviceDescription
set tonull
instead. - Remove
CryptoInfo.getFrameworkCryptoInfoV16
. UseCryptoInfo.getFrameworkCryptoInfo
instead. - Remove
NotificationUtil.createNotificationChannel(Context, String, int, int)
. UsecreateNotificationChannel(Context, String, int, int, int)
instead. - Remove
PlayerNotificationManager.setNotificationListener
. UsePlayerNotificationManager.Builder.setNotificationListener
instead. - Remove
PlayerNotificationManager.NotificationListener
onNotificationStarted(int, Notification)
andonNotificationCancelled(int)
. UseonNotificationPosted(int, Notification, boolean)
andonNotificationCancelled(int, boolean)
instead. - Remove
DownloadNotificationUtil
. UseDownloadNotificationHelper
instead. - Remove
extension-jobdispatcher
module. Use theextension-workmanager
module instead.
- Remove
- Published via the Google Maven repository (i.e., google()) rather than JCenter.
- Core:
- UI:
- DASH:
- Parse
forced_subtitle
role from DASH manifests (#8781).
- Parse
- DASH:
- Fix rounding error that could cause
SegmentTemplate.getSegmentCount()
to return incorrect values (#8804).
- Fix rounding error that could cause
- HLS:
- Fix bug of ignoring
EXT-X-START
when setting the live target offset (#8764). - Fix incorrect application of byte ranges to
EXT-X-MAP
tags (#8783). - Fix issue that could cause playback to become stuck if corresponding
EXT-X-DISCONTINUITY
tags in different media playlists occur at different positions in time (#8372). - Fix issue that could cause playback of on-demand content to not start in
cases where the media playlists referenced by the master playlist have
different starting
EXT-X-PROGRAM-DATE-TIME
tags. - Fix container type detection for segments with incorrect file extension or HTTP Content-Type (#8733).
- Fix bug of ignoring
- Extractors:
- Add support for
GContainer
andGContainerItem
XMP namespace prefixes in JPEG motion photo parsing. - Allow JFIF APP0 marker segment preceding Exif APP1 segment in
JpegExtractor
.
- Add support for
- Text:
- Parse SSA/ASS bold & italic info in
Style:
lines (#8435). - Don't display subtitles after the end position of the current media
period (if known). This ensures sideloaded subtitles respect the end
point of
ClippingMediaPeriod
and prevents content subtitles from continuing to be displayed over mid-roll ads (#5317, #8456). - Fix CEA-708 priority handling to sort cues in the order defined by the spec (#8704).
- Support TTML
textEmphasis
attributes, used for Japanese boutens. - Support TTML
shear
attributes.
- Parse SSA/ASS bold & italic info in
- Metadata:
- Ensure that timed metadata near the end of a period is not dropped (#8710).
- Cast extension:
- Fix
onPositionDiscontinuity
event so that it is not triggered with reasonDISCONTINUITY_REASON_PERIOD_TRANSITION
after a seek to another media item and so that it is not triggered after a timeline change.
- Fix
- IMA extension:
- FFmpeg extension: Fix playback failure when switching to TrueHD tracks during playback (#8616).
- Extractors:
- Add support for MP4 and QuickTime meta atoms that are not full atoms.
- UI:
- Make conditions to enable UI actions consistent in
DefaultControlDispatcher
,PlayerControlView
,StyledPlayerControlView
,PlayerNotificationManager
andTimelineQueueNavigator
. - Fix conditions to enable seeking to next/previous media item to handle the case where a live stream has ended.
- Make conditions to enable UI actions consistent in
- Audio:
- Fix
SimpleExoPlayer
reporting audio session ID as 0 in some cases (#8585).
- Fix
- IMA extension:
- Fix a bug where playback could get stuck when seeking into a playlist item with ads, if the preroll ad had preloaded but the window position of the seek should instead trigger playback of a midroll.
- Fix a bug with playback of ads in playlists, where the incorrect period index was used when deciding whether to trigger playback of an ad after a seek.
- Text:
- Parse SSA/ASS font size in
Style:
lines (#8435).
- Parse SSA/ASS font size in
- VP9 extension: Update to use NDK r21 (#8581).
- FLAC extension: Update to use NDK r21 (#8581).
- Opus extension: Update to use NDK r21 (#8581).
- FFmpeg extension: Update to use NDK r21 (#8581).
- Live streaming:
- IMA extension:
- Fix handling of repeated ad loads, to avoid ads being discarded if the user seeks away and then back to a preloaded postroll (for example).
- Fix a bug where an assertion would fail if the player started to buffer an ad media period before the ad URI was known then an ad state update arrived that didn't set the ad URI.
- Add
ImaAdsLoader.focusSkipButton
to allow apps to request that the skip button should receive UI focus, if shown (#8565).
- DRM:
- Core library:
- Verify correct thread usage in
SimpleExoPlayer
by default. Opt-out is still possible until the next major release usingsetThrowsWhenUsingWrongThread(false)
(#4463). - Add
Player.getCurrentStaticMetadata
andEventListener.onStaticMetadataChanged
to expose static metadata belonging to the currently playing stream (#7266). - Add
PlayerMessage.setLooper
and deprecatePlayerMessage.setHandler
. - Add option to
MergingMediaSource
to clip the durations of all sources to have the same length (#8422). - Remove
Player.setVideoDecoderOutputBufferRenderer
from Player API. UsesetVideoSurfaceView
andclearVideoSurfaceView
instead. - Default
SingleSampleMediaSource.treatLoadErrorsAsEndOfStream
totrue
so that errors loading external subtitle files do not cause playback to fail (#8430). A warning will be logged bySingleSampleMediaPeriod
whenever a load error is treated as though the end of the stream has been reached. - Time out on release to prevent ANRs if an underlying platform call is stuck (#4352).
- Time out when detaching a surface to prevent ANRs if the underlying platform call is stuck (#5887).
- Fix bug where
AnalyticsListener
callbacks could arrive in the wrong order (#8048).
- Verify correct thread usage in
- Media transformation:
- Add a new
transformer
module for converting media streams. The initially available transformations are changing the container format, removing tracks, and slow motion flattening.
- Add a new
- Low latency live streaming:
- Support low-latency DASH (also known as ULL-CMAF) and Apple's low-latency HLS extension.
- Add
LiveConfiguration
toMediaItem
to define live offset and playback speed adjustment parameters. The same parameters can be set onDefaultMediaSourceFactory
to apply for allMediaItems
. - Add
LivePlaybackSpeedControl
to control playback speed adjustments during live playbacks. Such adjustments allow the player to stay close to the live offset.DefaultLivePlaybackSpeedControl
is provided as a default implementation. - Add
targetLiveOffsetUs
parameter toLoadControl.shouldStartPlayback
.
- Extractors:
- Populate codecs string for H.264/AVC in MP4, Matroska and FLV streams to allow decoder capability checks based on codec profile and level (#8393).
- Populate codecs string for H.265/HEVC in MP4, Matroska and MPEG-TS streams to allow decoder capability checks based on codec profile and level (#8393).
- Add support for playing JPEG motion photos (#5405).
- Handle sample size mismatches between raw audio
stsd
information andstsz
fixed sample size in MP4 extractors. - Fix Vorbis private codec data parsing in the Matroska extractor (#8496).
- Track selection:
- Move
Player.getTrackSelector
to theExoPlayer
interface. - Move the mutable parts of
TrackSelection
into anExoTrackSelection
subclass. - Allow parallel adaptation of video and audio (#5111).
- Simplify enabling tunneling with
DefaultTrackSelector
.ParametersBuilder.setTunnelingAudioSessionId
has been replaced withParametersBuilder.setTunnelingEnabled
. The player's audio session ID will be used, and so a tunneling specific ID is no longer needed. - Add additional configuration parameters to
DefaultTrackSelector
.DefaultTrackSelector.ParametersBuilder
now includes:setPreferredVideoMimeType
,setPreferredVideoMimeTypes
,setPreferredAudioMimeType
andsetPreferredAudioMimeTypes
for specifying preferred video and audio MIME type(s) (#8320).setPreferredAudioLanguages
andsetPreferredTextLanguages
for specifying multiple preferred audio and text languages.setPreferredAudioRoleFlags
for specifying preferred audio role flags.
- Forward
Timeline
andMediaPeriodId
toTrackSelection.Factory
.
- Move
- DASH:
- HLS:
- Support playlist delta updates, blocking playlist reloads and rendition reports.
- Support low-latency HLS playback (
EXT-X-PART
and preload hints) (#5011).
- UI:
- Improve
StyledPlayerControlView
button animations. - Miscellaneous fixes for
StyledPlayerControlView
in minimal mode.
- Improve
- DRM:
- Fix playback failure when switching from PlayReady protected content to Widevine or Clearkey protected content in a playlist.
- Add
ExoMediaDrm.KeyRequest.getRequestType
(#7847). - Drop key and provision responses if
DefaultDrmSession
is released while waiting for the response. This prevents harmless log messages of the form:IllegalStateException: sending message to a Handler on a dead thread
(#8328). - Allow apps to fully customize DRM behaviour for each
MediaItem
by passing aDrmSessionManagerProvider
toMediaSourceFactory
(#8466).
- Analytics:
- Add an
onEvents
callback toPlayer.EventListener
andAnalyticsListener
. When one or more player states change simultaneously,onEvents
is called once after all of the callbacks associated with the individual state changes. - Pass a
DecoderReuseEvaluation
toAnalyticsListener
'sonVideoInputFormatChanged
andonAudioInputFormatChanged
methods. TheDecoderReuseEvaluation
indicates whether it was possible to re-use an existing decoder instance for the new format, and if not then the reasons why.
- Add an
- Video:
- Fall back to AVC/HEVC decoders for Dolby Vision streams with level 10 to 13 (#8530).
- Fix VP9 format capability checks on API level 23 and earlier. The platform does not correctly report the VP9 level supported by the decoder in this case, so we estimate it based on the decoder's maximum supported bitrate.
- Audio:
- Fix handling of audio session IDs
(#8190).
SimpleExoPlayer
now generates an audio session ID on construction, which can be immediately queried by callingSimpleExoPlayer.getAudioSessionId
. The audio session ID will only change if application code callsSimpleExoPlayer.setAudioSessionId
. - Replace
onAudioSessionId
withonAudioSessionIdChanged
inAudioListener
andAnalyticsListener
. Note thatonAudioSessionIdChanged
is called in fewer cases thanonAudioSessionId
was called, due to the improved handling of audio session IDs as described above. - Retry playback after some types of
AudioTrack
error. - Create E-AC3 JOC passthrough
AudioTrack
instances using the maximum supported channel count (instead of assuming 6 channels) from API 29.
- Fix handling of audio session IDs
(#8190).
- Text:
- Data sources:
- For
HttpDataSource
implementations, default to using the user agent of the underlying network stack. - Deprecate
HttpDataSource.Factory.getDefaultRequestProperties
.HttpDataSource.Factory.setDefaultRequestProperties
instead. - Add
DefaultHttpDataSource.Factory
and deprecateDefaultHttpDataSourceFactory
.
- For
- Metadata retriever:
- Parse Google Photos HEIC and JPEG motion photo metadata.
- IMA extension:
- Add support for playback of ads in playlists (#3750).
- Add
ImaAdsLoader.Builder.setEnableContinuousPlayback
for setting whether to request ads for continuous playback. - Upgrade IMA SDK dependency to 3.22.0. This fixes leaking of the ad view group (#7344, #8339).
- Fix a bug that could cause the next content position played after a seek to snap back to the cue point of the preceding ad, rather than the requested content position.
- Fix a regression that caused an ad group to be skipped after an initial seek to a non-zero position. Unsupported VPAID ads will still be skipped, but only after the preload timeout rather than instantly (#8428, #7832).
- Fix a regression that caused a short ad followed by another ad to be skipped due to playback being stuck buffering waiting for the second ad to load (#8492).
- FFmpeg extension:
- Link the FFmpeg library statically, saving 350KB in binary size on average.
- OkHttp extension:
- Add
OkHttpDataSource.Factory
and deprecateOkHttpDataSourceFactory
.
- Add
- Cronet extension:
- Add
CronetDataSource.Factory
and deprecateCronetDataSourceFactory
. - Support setting the user agent on
CronetDataSource.Factory
andCronetEngineWrapper
.
- Add
- MediaSession extension:
- Support
setPlaybackSpeed(float)
and disable it by default. UseMediaSessionConnector.setEnabledPlaybackActions(long)
to enable (#8229).
- Support
- Remove deprecated symbols:
AdaptiveMediaSourceEventListener
. UseMediaSourceEventListener
instead.DashMediaSource.Factory.setMinLoadableRetryCount(int)
. UseDashMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.DefaultAnalyticsListener
. UseAnalyticsListener
instead.DefaultLoadControl
constructors. UseDefaultLoadControl.Builder
instead.DrmInitData.get(UUID)
. UseDrmInitData.get(int)
andDrmInitData.SchemeData.matches(UUID)
instead.ExtractorsMediaSource.Factory.setMinLoadableRetryCount(int)
. UseExtractorsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.FixedTrackSelection.Factory
. If you need to disable adaptive selection inDefaultTrackSelector
, enable theDefaultTrackSelector.Parameters.forceHighestSupportedBitrate
flag.HlsMediaSource.Factory.setMinLoadableRetryCount(int)
. UseHlsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.MappedTrackInfo.getTrackFormatSupport(int, int, int)
. UseMappedTrackInfo.getTrackSupport(int, int, int)
instead.MappedTrackInfo.getTrackTypeRendererSupport(int)
. UseMappedTrackInfo.getTypeSupport(int)
instead.MappedTrackInfo.getUnassociatedTrackGroups()
. UseMappedTrackInfo.getUnmappedTrackGroups()
instead.MappedTrackInfo.length
. UseMappedTrackInfo.getRendererCount()
instead.Player.DefaultEventListener.onTimelineChanged(Timeline, Object)
. UsePlayer.EventListener.onTimelineChanged(Timeline, int)
instead.Player.setAudioAttributes(AudioAttributes)
. UsePlayer.AudioComponent.setAudioAttributes(AudioAttributes, boolean)
instead.PlayerView.setDefaultArtwork(Bitmap)
. UsePlayerView.setDefaultArtwork(Drawable)
instead.PlayerView.setShowBuffering(boolean)
. UsePlayerView.setShowBuffering(int)
instead.SimpleExoPlayer.clearMetadataOutput(MetadataOutput)
. UseSimpleExoPlayer.removeMetadataOutput(MetadataOutput)
instead.SimpleExoPlayer.clearTextOutput(TextOutput)
. UseSimpleExoPlayer.removeTextOutput(TextOutput)
instead.SimpleExoPlayer.clearVideoListener()
. UseSimpleExoPlayer.removeVideoListener(VideoListener)
instead.SimpleExoPlayer.getAudioStreamType()
. UseSimpleExoPlayer.getAudioAttributes()
instead.SimpleExoPlayer.setAudioDebugListener(AudioRendererEventListener)
. UseSimpleExoPlayer.addAnalyticsListener(AnalyticsListener)
instead.SimpleExoPlayer.setAudioStreamType(int)
. UseSimpleExoPlayer.setAudioAttributes(AudioAttributes)
instead.SimpleExoPlayer.setMetadataOutput(MetadataOutput)
. UseSimpleExoPlayer.addMetadataOutput(MetadataOutput)
instead. If your application is callingSimpleExoPlayer.setMetadataOutput(null)
, make sure to replace this call with a call toSimpleExoPlayer.removeMetadataOutput(MetadataOutput)
.SimpleExoPlayer.setPlaybackParams(PlaybackParams)
. UseSimpleExoPlayer.setPlaybackParameters(PlaybackParameters)
instead.SimpleExoPlayer.setTextOutput(TextOutput)
. UseSimpleExoPlayer.addTextOutput(TextOutput)
instead. If your application is callingSimpleExoPlayer.setTextOutput(null)
, make sure to replace this call with a call toSimpleExoPlayer.removeTextOutput(TextOutput)
.SimpleExoPlayer.setVideoDebugListener(VideoRendererEventListener)
. UseSimpleExoPlayer.addAnalyticsListener(AnalyticsListener)
instead.SimpleExoPlayer.setVideoListener(VideoListener)
. UseSimpleExoPlayer.addVideoListener(VideoListener)
instead. If your application is callingSimpleExoPlayer.setVideoListener(null)
, make sure to replace this call with a call toSimpleExoPlayer.removeVideoListener(VideoListener)
.SimpleExoPlayer.VideoListener
. Usecom.google.android.exoplayer2.video.VideoListener
instead.SingleSampleMediaSource.EventListener
and constructors. UseMediaSourceEventListener
andSingleSampleMediaSource.Factory
instead.SimpleExoPlayer.addVideoDebugListener
,SimpleExoPlayer.removeVideoDebugListener
,SimpleExoPlayer.addAudioDebugListener
andSimpleExoPlayer.removeAudioDebugListener
. UseSimpleExoPlayer.addAnalyticsListener
andSimpleExoPlayer.removeAnalyticsListener
instead.SingleSampleMediaSource.Factory.setMinLoadableRetryCount(int)
. UseSingleSampleMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.SsMediaSource.Factory.setMinLoadableRetryCount(int)
. UseSsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.
- Core library:
- Fix
MediaCodecRenderer
issue where empty streams would fail to play in bypass mode (#8374). - Fix playback issues after seeking during an ad (#8349).
- Fix propagation of
LoadErrorHandlingPolicy
fromDefaultMediaSourceFactory
intoSingleSampleMediaSource.Factory
when creating subtitle media sources fromMediaItem.playbackProperties.subtitles
(#8430).
- Fix
- UI:
- Fix issue where pop-up menus belonging to
StyledPlayerControlView
would not be dismissed when tapping outside of the menu area or pressing the back button, on API level 22 and earlier (#8272).
- Fix issue where pop-up menus belonging to
- Downloads:
- Fix crash in
DownloadManager
that could occur when adding a stopped download with the same ID as a download currently being removed (#8419).
- Fix crash in
- Text:
- Gracefully handle null-terminated subtitle content in Matroska containers.
- Fix CEA-708 anchor positioning (#1807).
- IMA extension:
- Media2 extension:
- Make media2-extension depend on AndroidX media2:media2-session:1.1.0 to fix a deadlock while creating PlaybackStateCompat internally. (#8011).
- Core library:
- UI:
- Fix incorrect color and text alignment of the
StyledPlayerControlView
fast forward and rewind buttons, when used together with thecom.google.android.material
library (#7898). - Add
dispatchPrepare(Player)
toControlDispatcher
and implement it inDefaultControlDispatcher
. DeprecatePlaybackPreparer
andsetPlaybackPreparer
inStyledPlayerView
,StyledPlayerControlView
,PlayerView
,PlayerControlView
,PlayerNotificationManager
andLeanbackPlayerAdapter
and useControlDispatcher
for dispatching prepare instead (#7882). - Increase seekbar's touch target height in
StyledPlayerControlView
. - Update
StyledPlayerControlView
menu items to behave correctly for right-to-left languages. - Support enabling the previous and next actions individually in
PlayerNotificationManager
.
- Fix incorrect color and text alignment of the
- Audio:
- Work around
AudioManager
crashes when callinggetStreamVolume
(#8191).
- Work around
- Extractors:
- IMA extension:
- Upgrade IMA SDK dependency to 3.21.0, and release the
AdsLoader
(#7344). - Improve handling of ad tags with unsupported VPAID ads (#7832).
- Fix a bug that caused multiple ads in an ad pod to be skipped when one ad in the ad pod was skipped.
- Fix a bug that caused ad progress not to be updated if the player resumed after buffering during an ad (#8239).
- Fix passing an ads response to the
ImaAdsLoader
builder. - Set the overlay language based on the device locale by default.
- Upgrade IMA SDK dependency to 3.21.0, and release the
- Cronet extension:
- Fix handling of HTTP status code 200 when making unbounded length range requests (#8090).
- Text
- Allow tx3g subtitles with
styl
boxes with start and/or end offsets that lie outside the length of the cue text.
- Allow tx3g subtitles with
- Media2 extension:
- Notify onBufferingEnded when the state of origin player becomes
STATE_IDLE
orSTATE_ENDED
. - Allow to remove all playlist items that makes the player reset (#8047).
- Notify onBufferingEnded when the state of origin player becomes
- Core library:
- Fix issue where
Player.setMediaItems
would ignore itsresetPosition
argument (#8024). - Fix bug where streams with highly uneven track durations may get stuck in a buffering state (#7943).
- Switch Guava dependency from
implementation
toapi
(#7905, #7993). - Add 403, 500 and 503 to the list of HTTP status codes that can trigger failover to another quality variant during adaptive playbacks.
- Fix issue where
- Data sources:
- Add support for
android.resource
URI scheme inRawResourceDataSource
(#7866).
- Add support for
- Text:
- UI:
- Fix animation when
StyledPlayerView
first shows its playback controls. - Improve touch targets in
StyledPlayerView
to make tapping easier. - Allow
subtitleButton
to be omitted in customStyledPlayerView
layouts (#7962). - Add an option to sort tracks by
Format
inTrackSelectionView
andTrackSelectionDialogBuilder
(#7709).
- Fix animation when
- Audio:
- Extractors:
- MP4:
- Add support for
_mp2
boxes (#7967). - Fix playback of files containing
pcm_alaw
orpcm_mulaw
audio tracks, by enabling sample rechunking for such tracks.
- Add support for
- MPEG-TS:
- MP3: Use TLEN ID3 tag to compute the stream duration (#7949).
- Ogg: Fix regression playing files with packets that span multiple pages (#7992).
- FLV: Make files seekable by using the key frame index (#7378).
- MP4:
- Downloads: Fix issue retrying progressive downloads, which could also result
in a crash in
DownloadManager.InternalHandler.onContentLengthChanged
(#8078). - HLS: Fix crash affecting chunkful preparation of master playlists that start with an I-FRAME only variant (#8025).
- IMA extension:
- Fix position reporting after fetch errors (#7956).
- Allow apps to specify a
VideoAdPlayerCallback
(#7944). - Accept ad tags via the
AdsMediaSource
constructor and deprecate passing them via theImaAdsLoader
constructor/builders. Passing the ad tag via media item playback properties continues to be supported. This is in preparation for supporting ads in playlists (#3750). - Add a way to override ad media MIME types (#7961).
- Fix incorrect truncation of large cue point positions (#8067).
- Upgrade IMA SDK dependency to 3.20.1. This brings in a fix for companion ads rendering when targeting API 29 (#6432).
To learn more about what's new in 2.12, read the corresponding blog post.
- Core library:
Player
:- Add a top level playlist API based on a new
MediaItem
class (#6161). The new methods for playlist manipulation aresetMediaItem(s)
,addMediaItem(s)
,moveMediaItem(s)
,removeMediaItem(s)
andclearMediaItems
. The playlist can be queried usinggetMediaItemCount
andgetMediaItemAt
. This API should be used instead ofConcatenatingMediaSource
in most cases. Learn more by reading this blog post. - Add
getCurrentMediaItem
for getting the currently playing item in the playlist. - Add
EventListener.onMediaItemTransition
to report when playback transitions from one item to another in the playlist. - Add
play
andpause
convenience methods. They are equivalent tosetPlayWhenReady(true)
andsetPlayWhenReady(false)
respectively. - Add
getCurrentLiveOffset
for getting the offset of the current playback position from the live edge of a live stream. - Add
getTrackSelector
for getting theTrackSelector
used by the player. - Add
AudioComponent.setAudioSessionId
to set the audio session ID. This method is also available onSimpleExoPlayer
. - Remove
PlaybackParameters.skipSilence
, and replace it withAudioComponent.setSkipSilenceEnabled
. This method is also available onSimpleExoPlayer
. AnAudioListener.onSkipSilenceEnabledChanged
callback is also added. - Add
TextComponent.getCurrentCues
to get the current cues. This method is also available onSimpleExoPlayer
. The current cues are no longer automatically forwarded to aTextOutput
when it's added to aSimpleExoPlayer
. - Add
Player.DeviceComponent
to query and control the device volume.SimpleExoPlayer
implements this interface. - Deprecate and rename
getPlaybackError
togetPlayerError
for consistency. - Deprecate and rename
onLoadingChanged
toonIsLoadingChanged
for consistency. - Deprecate
EventListener.onPlayerStateChanged
, replacing it withEventListener.onPlayWhenReadyChanged
andEventListener.onPlaybackStateChanged
. - Deprecate
EventListener.onSeekProcessed
because seek changes now happen instantly and listening toonPositionDiscontinuity
is sufficient.
- Add a top level playlist API based on a new
ExoPlayer
:- Add
setMediaSource(s)
andaddMediaSource(s)
toExoPlayer
, for addingMediaSource
instances directly to the playlist. - Add
ExoPlayer.setPauseAtEndOfMediaItems
to let the player pause at the end of each media item (#5660). - Allow passing
C.TIME_END_OF_SOURCE
toPlayerMessage.setPosition
to send aPlayerMessage
at the end of a stream.
- Add
SimpleExoPlayer
:SimpleExoPlayer
implements the newMediaItem
based playlist API, using aMediaSourceFactory
to convertMediaItem
instances to playableMediaSource
instances. ADefaultMediaSourceFactory
is used by default.Builder.setMediaSourceFactory
allows setting a custom factory.- Update APK shrinking guide
to explain how shrinking works with the new
MediaItem
andDefaultMediaSourceFactory
implementations (#7937). - Add additional options to
Builder
that were previously only accessible via setters. - Add opt-in to verify correct thread usage with
setThrowsWhenUsingWrongThread(true)
(#4463).
Format
:- Add a
Builder
and deprecate allcreate
methods and mostFormat.copyWith
methods. - Split
bitrate
intoaverageBitrate
andpeakBitrate
(#2863).
- Add a
LoadControl
:- Add a
playbackPositionUs
parameter toshouldContinueLoading
. - Set the default minimum buffer duration in
DefaultLoadControl
to 50 seconds (equal to the default maximum buffer), and treat audio and video the same.
- Add a
- Add a
MetadataRetriever
API for retrieving track information and static metadata for a media item (#3609). - Attach an identifier and extra information to load error events passed
to
LoadErrorHandlingPolicy
(#7309).LoadErrorHandlingPolicy
implementations should migrate to implementing the non-deprecated methods of the interface. - Add an option to
MergingMediaSource
to adjust the time offsets between the merged sources (#6103). - Move
MediaSourceEventListener.LoadEventInfo
andMediaSourceEventListener.MediaLoadData
to be top-level classes incom.google.android.exoplayer2.source
. - Move
SimpleDecoderVideoRenderer
andSimpleDecoderAudioRenderer
toDecoderVideoRenderer
andDecoderAudioRenderer
respectively, and generalize them to work withDecoder
rather thanSimpleDecoder
. - Deprecate
C.MSG_*
constants, replacing them with constants inRenderer
. - Split the
library-core
module intolibrary-core
,library-common
andlibrary-extractor
. Thelibrary-core
module has an API dependency on both of the new modules, so this change should be transparent to developers including ExoPlayer using Gradle dependencies. - Add a dependency on Guava.
- Video:
- Pass frame rate hint to
Surface.setFrameRate
on Android 11. - Fix incorrect aspect ratio when transitioning from one video to another with the same resolution, but a different pixel aspect ratio (#6646).
- Pass frame rate hint to
- Audio:
- Add experimental support for power efficient playback using audio offload.
- Add support for using framework audio speed adjustment instead of
ExoPlayer's implementation
(#7502). This option
can be set using
DefaultRenderersFactory.setEnableAudioTrackPlaybackParams
. - Add an event for the audio position starting to advance, to make it easier for apps to determine when audio playout started (#7577).
- Generalize support for floating point audio.
- Add an option to
DefaultAudioSink
for enabling floating point output. This option can also be set usingDefaultRenderersFactory.setEnableAudioFloatOutput
. - Add floating point output capability to
MediaCodecAudioRenderer
andLibopusAudioRenderer
, which is enabled automatically if the audio sink supports floating point output and if it makes sense for the content being played. - Enable the floating point output capability of
FfmpegAudioRenderer
automatically if the audio sink supports floating point output and if it makes sense for the content being played. The option to manually enable floating point output has been removed, since this now done with the generalized option onDefaultAudioSink
.
- Add an option to
- In
MediaCodecAudioRenderer
, stop passing audio samples throughMediaCodec
when playing PCM audio or encoded audio using passthrough mode. - Reuse audio decoders when transitioning through playlists of gapless audio, rather than reinstantiating them.
- Check
DefaultAudioSink
supports passthrough, in addition to checking theAudioCapabilities
(#7404).
- Text:
- Many of the changes described below improve support for Japanese subtitles. Read this blog post to learn more.
- Add a WebView-based output option to
SubtitleView
. This can display some features not supported by the existing Canvas-based output such as vertical text and rubies. It can be enabled by callingSubtitleView#setViewType(VIEW_TYPE_WEB)
. - Recreate the decoder when handling and swallowing decode errors in
TextRenderer
. This fixes a case where playback would never end when playing content with malformed subtitles (#7590). - Only apply
CaptionManager
font scaling inSubtitleView.setUserDefaultTextSize
if theCaptionManager
is enabled. - Improve positioning of vertical cues when rendered horizontally.
- Redefine
Cue.lineType=LINE_TYPE_NUMBER
in terms of aligning the cue text lines to grid of viewport lines. Only considerCue.lineAnchor
whenCue.lineType=LINE_TYPE_FRACTION
. - WebVTT:
- Add support for default text and background colors (#6581).
- Update position alignment parsing to recognise
line-left
,center
andline-right
. - Implement steps 4-10 of the WebVTT line computation algorithm.
- Stop parsing unsupported CSS properties. The spec provides an exhaustive list of which properties are supported.
- Parse the
ruby-position
CSS property. - Parse the
text-combine-upright
CSS property (i.e., tate-chu-yoko). - Parse the
<ruby>
and<rt>
tags.
- TTML:
- Parse the
tts:combineText
property (i.e., tate-chu-yoko). - Parse t
tts:ruby
andtts:rubyPosition
properties.
- Parse the
- CEA-608:
- Implement timing-out of stuck captions, as permitted by ANSI/CTA-608-E R-2014 Annex C.9. The default timeout is set to 16 seconds (#7181).
- Trim lines that exceed the maximum length of 32 characters (#7341).
- Fix positioning of roll-up captions in the top half of the screen (#7475).
- Stop automatically generating a CEA-608 track when playing
standalone MPEG-TS files. The previous behavior can still be
obtained by manually injecting a customized
DefaultTsPayloadReaderFactory
intoTsExtractor
.
- Metadata: Add minimal DVB Application Information Table (AIT) support.
- DASH:
- Add support for canceling in-progress segment fetches (#2848).
- Add support for CEA-708 embedded in FMP4.
- SmoothStreaming:
- Add support for canceling in-progress segment fetches (#2848).
- HLS:
- Extractors:
- Optimize the
Extractor
sniffing order to reduce start-up latency inDefaultExtractorsFactory
andDefaultHlsExtractorsFactory
(#6410). - Use filename extensions and response header MIME types to further
optimize
Extractor
sniffing order on a per-media basis. - MP3: Add
IndexSeeker
for accurate seeks in VBR MP3 streams (#6787). This seeker can be enabled by passingFLAG_ENABLE_INDEX_SEEKING
to theMp3Extractor
. A significant portion of the file may need to be scanned when a seek is performed, which may be costly for large files. - MP4: Fix playback of MP4 streams that contain Opus audio.
- FMP4: Add support for partially fragmented MP4s (#7308).
- Matroska:
- Support Dolby Vision (#7267).
- Populate
Format.label
with track titles. - Remove support for the
Invisible
block header flag.
- MPEG-TS: Add support for MPEG-4 Part 2 and H.263 (#1603, #5107).
- Ogg: Fix handling of non-contiguous pages (#7230).
- Optimize the
- UI:
- Add
StyledPlayerView
andStyledPlayerControlView
, which provide a more polished user experience thanPlayerView
andPlayerControlView
at the cost of decreased customizability. - Remove the previously deprecated
SimpleExoPlayerView
andPlaybackControlView
classes, along with the correspondingexo_simple_player_view.xml
andexo_playback_control_view.xml
layout resources. Use the equivalentPlayerView
,PlayerControlView
,exo_player_view.xml
andexo_player_control_view.xml
instead. - Add setter methods to
PlayerView
andPlayerControlView
to set whether the rewind, fast forward, previous and next buttons are shown (#7410). - Update
TrackSelectionDialogBuilder
to use the AndroidX app compatAlertDialog
rather than the platform version, if available (#7357). - Make UI components dispatch previous, next, fast forward and rewind
actions via their
ControlDispatcher
(#6926).
- Add
- Downloads and caching:
- Add
DownloadRequest.Builder
. - Add
DownloadRequest.keySetId
to make it easier to store an offline license keyset identifier alongside the other information that's persisted inDownloadIndex
. - Support passing an
Executor
toDefaultDownloaderFactory
on which data downloads are performed. - Parallelize and merge downloads in
SegmentDownloader
to improve download speeds (#5978). - Replace
CacheDataSinkFactory
andCacheDataSourceFactory
withCacheDataSink.Factory
andCacheDataSource.Factory
respectively. - Remove
DownloadConstructorHelper
and instead useCacheDataSource.Factory
directly. - Add
Requirements.DEVICE_STORAGE_NOT_LOW
, which can be specified as a requirement to aDownloadManager
for it to proceed with downloading. - For failed downloads, propagate the
Exception
that caused the failure toDownloadManager.Listener.onDownloadChanged
. - Support multiple non-overlapping write locks for the same key in
SimpleCache
. - Remove
CacheUtil
. Equivalent functionality is provided by a newCacheWriter
class,Cache.getCachedBytes
,Cache.removeResource
andCacheKeyFactory.DEFAULT
.
- Add
- DRM:
- Remove previously deprecated APIs to inject
DrmSessionManager
intoRenderer
instances.DrmSessionManager
must now be injected intoMediaSource
instances via theMediaSource
factories. - Add the ability to inject a custom
DefaultDrmSessionManager
intoOfflineLicenseHelper
(#7078). - Keep DRM sessions alive for a short time before fully releasing them (#7011, #6725, #7066).
- Remove support for
cbc1
andcens
encrytion schemes. Support for these schemes was removed from the Android platform from API level 30, and the range of API levels for which they are supported is too small to be useful. - Remove generic types from DRM components.
- Remove previously deprecated APIs to inject
- Track selection:
- Data sources:
- Add
HttpDataSource.InvalidResponseCodeException#responseBody
field (#6853). - Add
DataSpec.Builder
and deprecate mostDataSpec
constructors. - Add
DataSpec.customData
to allow applications to pass custom data throughDataSource
chains. - Deprecate
CacheDataSinkFactory
andCacheDataSourceFactory
, which are replaced byCacheDataSink.Factory
andCacheDataSource.Factory
respectively.
- Add
- Analytics:
- Extend
EventTime
with more details about the current player state (#7332). - Add
AnalyticsListener.onVideoFrameProcessingOffset
to report how early or late video frames are processed relative to them needing to be presented. Video frame processing offset fields are also added toDecoderCounters
. - Fix incorrect
MediaPeriodId
for some renderer errors reported byAnalyticsListener.onPlayerError
. - Remove
onMediaPeriodCreated
,onMediaPeriodReleased
andonReadingStarted
fromAnalyticsListener
.
- Extend
- Test utils: Add
TestExoPlayer
, a utility class with APIs to createSimpleExoPlayer
instances with fake components for testing. - Media2 extension: This is a new extension that makes it easy to use ExoPlayer together with AndroidX Media2. Read this blog post to learn more.
- Cast extension: Implement playlist API and deprecate the old queue manipulation API.
- IMA extension:
- Migrate to new 'friendly obstruction' IMA SDK APIs, and allow apps to
register a purpose and detail reason for overlay views via
AdsLoader.AdViewProvider
. - Add support for audio-only ads display containers by returning
null
fromAdsLoader.AdViewProvider.getAdViewGroup
, and allow skipping audio-only ads viaImaAdsLoader.skipAd
(#7689). - Add
ImaAdsLoader.Builder.setCompanionAdSlots
so it's possible to set companion ad slots without accessing theAdDisplayContainer
. - Add missing notification of
VideoAdPlayerCallback.onLoaded
. - Fix handling of incompatible VPAID ads (#7832).
- Fix handling of empty ads at non-integer cue points (#7889).
- Migrate to new 'friendly obstruction' IMA SDK APIs, and allow apps to
register a purpose and detail reason for overlay views via
- Demo app:
- Replace the
extensions
variant withdecoderExtensions
and update the demo app use the Cronet and IMA extensions by default. - Expand the
exolist.json
schema, as well the structure of intents that can be used to launchPlayerActivity
. See the Demo application page for the latest versions. Changes include:- Add
drm_session_for_clear_content
to allow attaching DRM sessions to clear audio and video tracks. - Add
clip_start_position_ms
andclip_end_position_ms
to allow clipped samples.
- Add
- Use
StyledPlayerControlView
rather thanPlayerView
. - Remove support for media tunneling, random ABR and playback of spherical video. Developers wishing to experiment with these features can enable them by modifying the demo app source code.
- Add support for downloading DRM-protected content using offline Widevine licenses.
- Replace the
- Fix distorted playback of floating point audio when samples exceed the
[-1, 1]
nominal range. - MP4:
- Add support for
piff
andisml
brands (#7584). - Fix playback of very short MP4 files.
- Add support for
- FMP4:
- Fix
saiz
andsenc
sample count checks, resolving a "length mismatch"ParserException
when playing certain protected FMP4 streams (#7592). - Fix handling of
traf
boxes containing multiplesbgp
orsgpd
boxes.
- Fix
- FLV: Ignore
SCRIPTDATA
segments with invalid name types, rather than failing playback (#7675). - Better infer the content type of
.ism
and.isml
streaming URLs. - Workaround an issue on Broadcom based devices where playbacks would not
transition to
STATE_ENDED
when using video tunneling mode (#7647). - IMA extension: Upgrade to IMA SDK 3.19.4, bringing in a fix for setting the media load timeout (#7170).
- Demo app: Fix playback of ClearKey protected content on API level 26 and earlier (#7735).
- IMA extension: Fix the way postroll "content complete" notifications are handled to avoid repeatedly refreshing the timeline after playback ends.
- UI: Prevent
PlayerView
from temporarily hiding the video surface when seeking to an unprepared period within the current window. For example when seeking over an ad group, or to the next period in a multi-period DASH stream (#5507). - IMA extension:
- Add option to skip ads before the start position.
- Catch unexpected errors in
stopAd
to avoid a crash (#7492). - Fix a bug that caused playback to be stuck buffering on resuming from the background after all ads had played to the end (#7508).
- Fix a bug where the number of ads in an ad group couldn't change (#7477).
- Work around unexpected
pauseAd
/stopAd
for ads that have preloaded on seeking to another position (#7492). - Fix incorrect rounding of ad cue points.
- Fix handling of postrolls preloading (#7518).
- Improve the smoothness of video playback immediately after starting, seeking or resuming a playback (#6901).
- Add
SilenceMediaSource.Factory
to support tags. - Enable the configuration of
SilenceSkippingAudioProcessor
(#6705). - Fix bug where
PlayerMessages
throw an exception afterMediaSources
are removed from the playlist (#7278). - Fix "Not allowed to start service"
IllegalStateException
inDownloadService
(#7306). - Fix issue in
AudioTrackPositionTracker
that could cause negative positions to be reported at the start of playback and immediately after seeking (#7456). - Fix further cases where downloads would sometimes not resume after their network requirements are met (#7453).
- DASH:
- Merge trick play adaptation sets (i.e., adaptation sets marked with
http://dashif.org/guidelines/trickmode
) into the sameTrackGroup
as the main adaptation sets to which they refer. Trick play tracks are marked with theC.ROLE_FLAG_TRICK_PLAY
flag. - Fix assertion failure in
SampleQueue
when playing DASH streams with EMSG tracks (#7273).
- Merge trick play adaptation sets (i.e., adaptation sets marked with
- MP4: Store the Android capture frame rate only in
Format.metadata
.Format.frameRate
now stores the calculated frame rate. - FMP4: Avoid throwing an exception while parsing default sample values whose most significant bits are set (#7207).
- MP3: Fix issue parsing the XING headers belonging to files larger than 2GB (#7337).
- MPEG-TS: Fix issue where SEI NAL units were incorrectly dropped from H.265 samples (#7113).
- UI:
- Fix
DefaultTimeBar
to respect touch transformations (#7303). - Add
showScrubber
andhideScrubber
methods toDefaultTimeBar
.
- Fix
- Text:
- Use anti-aliasing and bitmap filtering when displaying bitmap subtitles.
- Fix
SubtitlePainter
to renderEDGE_TYPE_OUTLINE
using the correct color.
- IMA extension:
- Upgrade to IMA SDK version 3.19.0, and migrate to new preloading APIs (#6429). This fixes several issues involving preloading and handling of ad loading error cases: (#4140, #5006, #6030, #6097, #6425, #6967, #7041, #7161, #7212, #7340).
- Add support for timing out ad preloading, to avoid playback getting stuck if an ad group unexpectedly fails to load (#5444, #5966, #7002).
- Fix
AdsMediaSource
childMediaSource
s not being released.
- Cronet extension: Default to using the Cronet implementation in Google Play Services rather than Cronet Embedded. This allows Cronet to be used with a negligible increase in application size, compared to approximately 8MB when embedding the library.
- OkHttp extension: Upgrade OkHttp dependency to 3.12.11.
- MediaSession extension:
- AV1 extension: Add a heuristic to determine the default number of threads used for AV1 playback using the extension.
- Add
SimpleExoPlayer.setWakeMode
to allow automaticWifiLock
andWakeLock
handling (#6914). To use this feature, you must add the WAKE_LOCK permission to your application's manifest file. - Text:
- Audio:
- Enable playback speed adjustment and silence skipping for floating point
PCM audio, via resampling to 16-bit integer PCM. To output the original
floating point audio without adjustment, pass
enableFloatOutput=true
to theDefaultAudioSink
constructor (#7134). - Workaround issue that could cause slower than realtime playback of AAC on Android 10 (#6671).
- Fix case where another app spuriously holding transient audio focus could prevent ExoPlayer from acquiring audio focus for an indefinite period of time (#7182).
- Fix case where the player volume could be permanently ducked if audio focus was released whilst ducking.
- Fix playback of WAV files with trailing non-media bytes (#7129).
- Fix playback of ADTS files with mid-stream ID3 metadata.
- Enable playback speed adjustment and silence skipping for floating point
PCM audio, via resampling to 16-bit integer PCM. To output the original
floating point audio without adjustment, pass
- DRM:
- Fix stuck ad playbacks with DRM protected content (#7188).
- Fix playback of Widevine protected content that only provides V1 PSSH atoms on API levels 21 and 22.
- Fix playback of PlayReady content on Fire TV Stick (Gen 2).
- DASH:
- Update the manifest URI to avoid repeated HTTP redirects (#6907).
- Parse period
AssetIdentifier
elements.
- HLS: Recognize IMSC subtitles (#7185).
- UI: Add an option to set whether to use the orientation sensor for rotation in spherical playbacks (#6761).
- Analytics: Fix
PlaybackStatsListener
behavior when not keeping history (#7160). - FFmpeg extension: Add support for
x86_64
architecture. - Opus extension: Fix parsing of negative gain values (#7046).
- Cast extension: Upgrade
play-services-cast-framework
dependency to 18.1.0. This fixes an issue whereRemoteServiceException
was thrown due toContext.startForegroundService()
not callingService.startForeground()
(#7191).
- SmoothStreaming: Fix regression that broke playback in 2.11.2 (#6981).
- DRM: Fix issue switching from protected content that uses a 16-byte initialization vector to one that uses an 8-byte initialization vector (#6982).
- Add Java FLAC extractor (#6406).
- Startup latency optimization:
- Reduce startup latency for DASH and SmoothStreaming playbacks by allowing codec initialization to occur before the network connection for the first media segment has been established.
- Reduce startup latency for on-demand DASH playbacks by allowing codec initialization to occur before the sidx box has been loaded.
- Downloads:
- DRM: Fix
NullPointerException
when playing DRM protected content (#6951). - Metadata:
- Update
IcyDecoder
to try ISO-8859-1 decoding if UTF-8 decoding fails. Also changeIcyInfo.rawMetadata
fromString
tobyte[]
to allow developers to handle data that's neither UTF-8 nor ISO-8859-1 (#6753). - Select multiple metadata tracks if multiple metadata renderers are available (#6676).
- Add support for ID3 genres added in Wimamp 5.6 (2010).
- Update
- UI:
- HLS: Fix playback of DRM protected content that uses key rotation (#6903).
- WAV:
- Support IMA ADPCM encoded data.
- Improve support for G.711 A-law and mu-law encoded data.
- MP4: Support "twos" codec (big endian PCM) (#5789).
- FMP4: Add support for encrypted AC-4 tracks.
- HLS: Fix slow seeking into long MP3 segments (#6155).
- Fix handling of E-AC-3 streams that contain AC-3 syncframes (#6602).
- Fix playback of TrueHD streams in Matroska (#6845).
- Fix MKV subtitles to disappear when intended instead of lasting until the next cue (#6833).
- OkHttp extension: Upgrade OkHttp dependency to 3.12.8, which fixes a class
of
SocketTimeoutException
issues when using HTTP/2 (#4078). - FLAC extension: Fix handling of bit depths other than 16 in
FLACDecoder
. This issue caused FLAC streams with other bit depths to sound like white noise on earlier releases, but only when embedded in a non-FLAC container such as Matroska or MP4. - Demo apps: Add
GL demo app to
show how to render video to a
GLSurfaceView
while applying a GL shader. (#6920).
- UI: Exclude
DefaultTimeBar
region from system gesture detection (#6685). - ProGuard fixes:
- Ensure
Libgav1VideoRenderer
constructor is kept for use byDefaultRenderersFactory
(#6773). - Ensure
VideoDecoderOutputBuffer
and its members are kept for use by video decoder extensions. - Ensure raw resources used with
RawResourceDataSource
are kept. - Suppress spurious warnings about the
javax.annotation
package, and restructure use ofIntDef
annotations to remove spurious warnings aboutSsaStyle$SsaAlignment
(#6771).
- Ensure
- Fix
CacheDataSource
to correctly propagateDataSpec.httpRequestHeaders
. - Fix issue with
DefaultDownloadIndex
that could result in anIllegalStateException
being thrown fromDefaultDownloadIndex.getDownloadForCurrentRow
(#6785). - Fix
IndexOutOfBoundsException
inSinglePeriodTimeline.getWindow
(#6776). - Add missing
@Nullable
toMediaCodecAudioRenderer.getMediaClock
andSimpleDecoderAudioRenderer.getMediaClock
(#6792).
- Core library:
- Replace
ExoPlayerFactory
bySimpleExoPlayer.Builder
andExoPlayer.Builder
. - Add automatic
WakeLock
handling toSimpleExoPlayer
, which can be enabled by callingSimpleExoPlayer.setHandleWakeLock
(#5846). To use this feature, you must add the WAKE_LOCK permission to your application's manifest file. - Add automatic "audio becoming noisy" handling to
SimpleExoPlayer
, which can be enabled by callingSimpleExoPlayer.setHandleAudioBecomingNoisy
. - Wrap decoder exceptions in a new
DecoderException
class and report them as renderer errors. - Add
Timeline.Window.isLive
to indicate that a window is a live stream (#2668 and #5973). - Add
Timeline.Window.uid
to uniquely identify window instances. - Deprecate
setTag
parameter ofTimeline.getWindow
. Tags will always be set. - Deprecate passing the manifest directly to
Player.EventListener.onTimelineChanged
. It can be accessed throughTimeline.Window.manifest
orPlayer.getCurrentManifest()
- Add
MediaSource.enable
andMediaSource.disable
to improve resource management in playlists. - Add
MediaPeriod.isLoading
to improvePlayer.isLoading
state. - Fix issue where player errors are thrown too early at playlist transitions (#5407).
- Add
Format
and renderer support flags to rendererExoPlaybackException
s. - Where there are multiple platform decoders for a given MIME type, prefer
to use one that advertises support for the profile and level of the
media being played over one that does not, even if it does not come
first in the
MediaCodecList
.
- Replace
- DRM:
- Inject
DrmSessionManager
into theMediaSources
instead ofRenderers
. This allows eachMediaSource
in aConcatenatingMediaSource
to use a differentDrmSessionManager
(#5619). - Add
DefaultDrmSessionManager.Builder
, and removeDefaultDrmSessionManager
static factory methods that leakedExoMediaDrm
instances (#4721). - Add support for the use of secure decoders when playing clear content
(#4867). This can be
enabled using
DefaultDrmSessionManager.Builder
'ssetUseDrmSessionsForClearContent
method. - Add support for custom
LoadErrorHandlingPolicies
in key and provisioning requests (#6334). Custom policies can be passed viaDefaultDrmSessionManager.Builder
'ssetLoadErrorHandlingPolicy
method. - Use
ExoMediaDrm.Provider
inOfflineLicenseHelper
to avoid leakingExoMediaDrm
instances (#4721).
- Inject
- Track selection:
- Update
DefaultTrackSelector
to set a viewport constraint for the default display by default. - Update
DefaultTrackSelector
to set text language and role flag constraints for the device's accessibility settings by default (#5749). - Add option to set preferred text role flags using
DefaultTrackSelector.ParametersBuilder.setPreferredTextRoleFlags
.
- Update
- LoadControl:
- Default
prioritizeTimeOverSizeThresholds
to false to prevent OOM errors (#6647).
- Default
- Android 10:
- Set
compileSdkVersion
to 29 to enable use of Android 10 APIs. - Expose new
isHardwareAccelerated
,isSoftwareOnly
andisVendor
flags inMediaCodecInfo
(#5839). - Add
allowedCapturePolicy
field toAudioAttributes
to allow to configuration of the audio capture policy.
- Set
- Video:
- Pass the codec output
MediaFormat
toVideoFrameMetadataListener
. - Fix byte order of HDR10+ static metadata to match CTA-861.3.
- Support out-of-band HDR10+ dynamic metadata for VP9 in WebM/Matroska.
- Assume that protected content requires a secure decoder when evaluating
whether
MediaCodecVideoRenderer
supports a given video format (#5568). - Fix Dolby Vision fallback to AVC and HEVC.
- Fix early end-of-stream detection when using video tunneling, on API level 23 and above.
- Fix an issue where a keyframe was rendered rather than skipped when performing an exact seek to a non-zero position close to the start of the stream.
- Pass the codec output
- Audio:
- Fix the start of audio getting truncated when transitioning to a new item in a playlist of Opus streams.
- Workaround broken raw audio decoding on Oppo R9 (#5782).
- Reconfigure audio sink when PCM encoding changes (#6601).
- Allow
AdtsExtractor
to encounter EOF when calculating average frame size (#6700).
- Text:
- Add support for position and overlapping start/end times in SSA/ASS subtitles (#6320).
- Require an end time or duration for SubRip (SRT) and SubStation Alpha (SSA/ASS) subtitles. This applies to both sidecar files & subtitles embedded in Matroska streams.
- UI:
- Make showing and hiding player controls accessible to TalkBack in
PlayerView
. - Rename
spherical_view
surface type tospherical_gl_surface_view
. - Make it easier to override the shuffle, repeat, fullscreen, VR and small notification icon assets (#6709).
- Make showing and hiding player controls accessible to TalkBack in
- Analytics:
- Remove
AnalyticsCollector.Factory
. Instances should be created directly, and thePlayer
should be set by callingAnalyticsCollector.setPlayer
. - Add
PlaybackStatsListener
to collectPlaybackStats
for analysis and analytics reporting.
- Remove
- DataSource
- Add
DataSpec.httpRequestHeaders
to support setting per-request headers for HTTP and HTTPS. - Remove the
DataSpec.FLAG_ALLOW_ICY_METADATA
flag. Use is replaced by setting theIcyHeaders.REQUEST_HEADER_ENABLE_METADATA_NAME
header inDataSpec.httpRequestHeaders
. - Fail more explicitly when local file URIs contain invalid parts (e.g. a fragment) (#6470).
- Add
- DASH: Support negative @r values in segment timelines (#1787).
- HLS:
- Use peak bitrate rather than average bitrate for adaptive track selection.
- Fix issue where streams could get stuck in an infinite buffering state after a postroll ad (#6314).
- Matroska: Support lacing in Blocks (#3026).
- AV1 extension:
- New in this release. The AV1 extension allows use of the libgav1 software decoder in ExoPlayer. You can read more about playing AV1 videos with ExoPlayer here.
- VP9 extension:
- Update to use NDK r20.
- Rename
VpxVideoSurfaceView
toVideoDecoderSurfaceView
and move it to the core library. - Move
LibvpxVideoRenderer.MSG_SET_OUTPUT_BUFFER_RENDERER
toC.MSG_SET_OUTPUT_BUFFER_RENDERER
. - Use
VideoDecoderRenderer
as an implementation ofVideoDecoderOutputBufferRenderer
, instead ofVideoDecoderSurfaceView
.
- FLAC extension: Update to use NDK r20.
- Opus extension: Update to use NDK r20.
- FFmpeg extension:
- Update to use NDK r20.
- Update to use FFmpeg version 4.2. It is necessary to rebuild the native part of the extension after this change, following the instructions in the extension's readme.
- MediaSession extension: Add
MediaSessionConnector.setCaptionCallback
to supportACTION_SET_CAPTIONING_ENABLED
events. - GVR extension: This extension is now deprecated.
- Demo apps:
- Add
SurfaceControl demo app
to show how to use the Android 10
SurfaceControl
API with ExoPlayer (#677). - Add support for subtitle files to the Main demo app (#5523).
- Remove the IMA demo app. IMA functionality is demonstrated by the main demo app.
- Add basic DRM support to the Cast demo app.
- Add
SurfaceControl demo app
to show how to use the Android 10
- TestUtils: Publish the
testutils
module to simplify unit testing with ExoPlayer (#6267). - IMA extension: Remove
AdsManager
listeners on release to avoid leaking anAdEventListener
provided by the app (#6687).
- E-AC3 JOC
- Handle new signaling in DASH manifests (#6636).
- Fix E-AC3 JOC passthrough playback failing to initialize due to incorrect channel count check.
- FLAC
- Fix sniffing for some FLAC streams.
- Fix FLAC
Format.bitrate
values.
- Parse ALAC channel count and sample rate information from a more robust source when contained in MP4 (#6648).
- Fix seeking into multi-period content in the edge case that the period containing the seek position has just been removed (#6641).
- HLS: Fix detection of Dolby Atmos to match the HLS authoring specification.
- MediaSession extension: Update shuffle and repeat modes when playback state is invalidated (#6582).
- Fix the start of audio getting truncated when transitioning to a new item in a playlist of Opus streams.
- Add
Player.onPlaybackSuppressionReasonChanged
to allow listeners to detect playbacks suppressions (e.g. transient audio focus loss) directly (#6203). - DASH:
- HLS: Add support for ID3 in EMSG when using FMP4 streams (spec).
- MP3: Add workaround to avoid prematurely ending playback of some SHOUTcast live streams (#6537, #6315 and #5658).
- Metadata: Expose the raw ICY metadata through
IcyInfo
(#6476). - UI:
- Setting
app:played_color
onPlayerView
andPlayerControlView
no longer adjusts the colors of the scrubber handle , buffered and unplayed parts of the time bar. These can be set separately usingapp:scrubber_color
,app:buffered_color
andapp_unplayed_color
respectively. - Setting
app:ad_marker_color
onPlayerView
andPlayerControlView
no longer adjusts the color of played ad markers. The color of played ad markers can be set separately usingapp:played_ad_marker_color
.
- Setting
- Add
Player.isPlaying
andEventListener.onIsPlayingChanged
to check whether the playback position is advancing. This helps to determine if playback is suppressed due to audio focus loss. Also addPlayer.getPlaybackSuppressedReason
to determine the reason of the suppression (#6203). - Track selection
- Add
allowAudioMixedChannelCountAdaptiveness
parameter toDefaultTrackSelector
to allow adaptive selections of audio tracks with different channel counts. - Improve text selection logic to always prefer the better language matches over other selection parameters.
- Fix audio selection issue where languages are compared by bitrate (#6335).
- Add
- Performance
- Increase maximum video buffer size from 13MB to 32MB. The previous default was too small for high quality streams.
- Reset
DefaultBandwidthMeter
to initial values on network change. - Bypass sniffing in
ProgressiveMediaPeriod
in case a single extractor is provided (#6325).
- Metadata
- Support EMSG V1 boxes in FMP4.
- Support unwrapping of nested metadata (e.g. ID3 and SCTE-35 in EMSG).
- Add
HttpDataSource.getResponseCode
to provide the status code associated with the most recent HTTP response. - Fix transitions between packed audio and non-packed audio segments in HLS (#6444).
- Fix issue where a request would be retried after encountering an error, even
though the
LoadErrorHandlingPolicy
classified the error as fatal. - Fix initialization data handling for FLAC in MP4 (#6396, #6397).
- Fix decoder selection for E-AC3 JOC streams (#6398).
- Fix
PlayerNotificationManager
to show play icon rather than pause icon when playback is ended (#6324). - RTMP extension: Upgrade LibRtmp-Client-for-Android to fix RTMP playback issues (#4200, #4249, #4319, #4337).
- IMA extension: Fix crash in
ImaAdsLoader.onTimelineChanged
(#5831).
- Offline: Add
Scheduler
implementation that usesWorkManager
. - Add ability to specify a description when creating notification channels via ExoPlayer library classes.
- Switch normalized BCP-47 language codes to use 2-letter ISO 639-1 language tags instead of 3-letter ISO 639-2 language tags.
- Ensure the
SilenceMediaSource
position is in range (#6229). - WAV: Calculate correct duration for clipped streams (#6241).
- MP3: Use CBR header bitrate, not calculated bitrate. This reverts a change from 2.9.3 (#6238).
- FLAC extension: Parse
VORBIS_COMMENT
andPICTURE
metadata (#5527). - Fix issue where initial seek positions get ignored when playing a preroll ad (#6201).
- Fix issue where invalid language tags were normalized to "und" instead of keeping the original (#6153).
- Fix
DataSchemeDataSource
re-opening and range requests (#6192). - Fix FLAC and ALAC playback on some LG devices (#5938).
- Fix issue when calling
performClick
onPlayerView
withoutPlayerControlView
(#6260). - Fix issue where playback speeds are not used in adaptive track selections after manual selection changes for other renderers (#6256).
- Display last frame when seeking to end of stream (#2568).
- Audio:
- Fix an issue where not all audio was played out when the configuration for the underlying track was changing (e.g., at some period transitions).
- Fix an issue where playback speed was applied inaccurately in playlists (#6117).
- UI: Fix
PlayerView
incorrectly consuming touch events if no controller is attached (#6109). - CEA608: Fix repetition of special North American characters (#6133).
- FLV: Fix bug that caused playback of some live streams to not start (#6111).
- SmoothStreaming: Parse text stream
Subtype
intoFormat.roleFlags
. - MediaSession extension: Fix
MediaSessionConnector.play()
not resuming playback (#6093).
- Add
ResolvingDataSource
for just-in-time resolution ofDataSpec
s (#5779). - Add
SilenceMediaSource
that can be used to play silence of a given duration (#5735). - Offline:
- UI:
- Subtitles:
- IMA: Fix ad pod index offset calculation without preroll (#5928).
- Add a
playWhenReady
flag to MediaSessionConnector.PlaybackPreparer methods to indicate whether a controller sent a play or only a prepare command. This allows to take advantage of decoder reuse with the MediaSessionConnector (#5891). - Add
ProgressUpdateListener
toPlayerControlView
(#5834). - Add support for auto-detecting UDP streams in
DefaultDataSource
(#6036). - Allow enabling decoder fallback with
DefaultRenderersFactory
(#5942). - Gracefully handle revoked
ACCESS_NETWORK_STATE
permission (#6019). - Fix decoding problems when seeking back after seeking beyond a mid-roll ad (#6009).
- Fix application of
maxAudioBitrate
for adaptive audio track groups (#6006). - Fix bug caused by parallel adaptive track selection using
Format
s without bitrate information (#5971). - Fix bug in
CastPlayer.getCurrentWindowIndex()
(#5955).
- Offline: Add option to remove all downloads.
- HLS: Fix
NullPointerException
when using HLS chunkless preparation (#5868). - Fix handling of empty values and line terminators in SHOUTcast ICY metadata (#5876).
- Fix DVB subtitles for SDK 28 (#5862).
- Add a workaround for a decoder failure on ZTE Axon7 mini devices when playing 48kHz audio (#5821).
- Core library:
- Improve decoder re-use between playbacks (#2826). Read this blog post for more details.
- Rename
ExtractorMediaSource
toProgressiveMediaSource
. - Fix issue where using
ProgressiveMediaSource.Factory
would mean thatDefaultExtractorsFactory
would be kept by proguard. CustomExtractorsFactory
instances must now be passed via theProgressiveMediaSource.Factory
constructor, andsetExtractorsFactory
is deprecated. - Make the default minimum buffer size equal the maximum buffer size for video playbacks (#2083).
- Move
PriorityTaskManager
fromDefaultLoadControl
toSimpleExoPlayer
. - Add new
ExoPlaybackException
types for remote exceptions and out-of-memory errors. - Use full BCP 47 language tags in
Format
. - Do not retry failed loads whose error is
FileNotFoundException
. - Fix issue where not resetting the position for a new
MediaSource
in calls toExoPlayer.prepare
causes anIndexOutOfBoundsException
(#5520).
- Offline:
- Improve offline support.
DownloadManager
now tracks all offline content, not just tasks in progress. Read this page for more details.
- Improve offline support.
- Caching:
- Improve performance of
SimpleCache
(#4253). - Cache data with unknown length by default. The previous flag to opt in
to this behavior (
DataSpec.FLAG_ALLOW_CACHING_UNKNOWN_LENGTH
) has been replaced with an opt out flag (DataSpec.FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN
).
- Improve performance of
- Extractors:
- MP4/FMP4: Add support for Dolby Vision.
- MP4: Fix issue handling meta atoms in some streams (#5698, #5694).
- MP3: Add support for SHOUTcast ICY metadata (#3735).
- MP3: Fix ID3 frame unsychronization (#5673).
- MP3: Fix playback of badly clipped files (#5772).
- MPEG-TS: Enable HDMV DTS stream detection only if a flag is set. By default (i.e. if the flag is not set), the 0x82 elementary stream type is now treated as an SCTE subtitle track (#5330).
- Track selection:
- Add options for controlling audio track selections to
DefaultTrackSelector
(#3314). - Update
TrackSelection.Factory
interface to support creating all track selections together. - Allow to specify a selection reason for a
SelectionOverride
. - Select audio track based on system language if no preference is provided.
- When no text language preference matches, only select forced text tracks whose language matches the selected audio language.
- Add options for controlling audio track selections to
- UI:
- Update
DefaultTimeBar
based on duration of media and add parameter to set the minimum update interval to control the smoothness of the updates (#5040). - Move creation of dialogs for
TrackSelectionView
s toTrackSelectionDialogBuilder
and add option to select multiple overrides. - Change signature of
PlayerNotificationManager.NotificationListener
to better fit service requirements. - Add option to include navigation actions in the compact mode of
notifications created using
PlayerNotificationManager
. - Fix issues with flickering notifications on KitKat when using
PlayerNotificationManager
andDownloadNotificationUtil
. For the latter, applications should switch to usingDownloadNotificationHelper
. - Fix accuracy of D-pad seeking in
DefaultTimeBar
(#5767).
- Update
- Audio:
- Allow
AudioProcessor
s to be drained of pending output after they are reconfigured. - Fix an issue that caused audio to be truncated at the end of a period when switching to a new period where gapless playback information was newly present or newly absent.
- Add support for reading AC-4 streams (#5303).
- Allow
- Video:
- Remove
MediaCodecSelector.DEFAULT_WITH_FALLBACK
. Apps should instead signal that fallback should be used by passingtrue
as theenableDecoderFallback
parameter when instantiating the video renderer. - Support video tunneling when the decoder is not listed first for the MIME type (#3100).
- Query
MediaCodecList.ALL_CODECS
when selecting a tunneling decoder (#5547).
- Remove
- DRM:
- Fix black flicker when keys rotate in DRM protected content (#3561).
- Work around lack of LA_URL attribute in PlayReady key request init data.
- CEA-608: Improved conformance to the specification (#3860).
- DASH:
- Parse role and accessibility descriptors into
Format.roleFlags
. - Support multiple CEA-608 channels muxed into FMP4 representations (#5656).
- Parse role and accessibility descriptors into
- HLS:
- Prevent unnecessary reloads of initialization segments.
- Form an adaptive track group out of audio renditions with matching name.
- Support encrypted initialization segments (#5441).
- Parse
EXT-X-MEDIA
CHARACTERISTICS
attribute intoFormat.roleFlags
. - Add metadata entry for HLS tracks to expose master playlist information.
- Prevent
IndexOutOfBoundsException
in some live HLS scenarios (#5816).
- Support for playing spherical videos on Daydream.
- Cast extension: Work around Cast framework returning a limited-size queue items list (#4964).
- VP9 extension: Remove RGB output mode and libyuv dependency, and switch to
surface YUV output as the default. Remove constructor parameters
scaleToFit
anduseSurfaceYuvOutput
. - MediaSession extension:
- Let apps intercept media button events (#5179).
- Fix issue with
TimelineQueueNavigator
not publishing the queue in shuffled order when in shuffle mode. - Allow handling of custom commands via
registerCustomCommandReceiver
. - Add ability to include an extras
Bundle
when reporting a custom error.
- Log warnings when extension native libraries can't be used, to help with diagnosing playback failures (#5788).
- Remove
player
andisTopLevelSource
parameters fromMediaSource.prepare
. - IMA extension:
- Require setting the
Player
onAdsLoader
instances before playback. - Remove deprecated
ImaAdsMediaSource
. CreateAdsMediaSource
with anImaAdsLoader
instead. - Remove deprecated
AdsMediaSource
constructors. Listen for media source events usingAdsMediaSource.addEventListener
, and ad interaction events by adding a listener when buildingImaAdsLoader
. - Allow apps to register playback-related obstructing views that are on
top of their ad display containers via
AdsLoader.AdViewProvider
.PlayerView
implements this interface and will register its control view. This makes it possible for ad loading SDKs to calculate ad viewability accurately.
- Require setting the
- DASH: Fix issue handling large
EventStream
presentation timestamps (#5490). - HLS: Fix transition to STATE_ENDED when playing fragmented mp4 in chunkless preparation (#5524).
- Revert workaround for video quality problems with Amlogic decoders, as this may cause problems for some devices and/or non-interlaced content (#5003).
- HLS: Parse
CHANNELS
attribute fromEXT-X-MEDIA
tag. - ConcatenatingMediaSource:
- Add
Handler
parameter to methods that take a callbackRunnable
. - Fix issue with dropped messages when releasing the source (#5464).
- Add
- ExtractorMediaSource: Fix issue that could cause the player to get stuck buffering at the end of the media.
- PlayerView: Fix issue preventing
OnClickListener
from receiving events (#5433). - IMA extension: Upgrade IMA dependency to 3.10.6.
- Cronet extension: Upgrade Cronet dependency to 71.3578.98.
- OkHttp extension: Upgrade OkHttp dependency to 3.12.1.
- MP3: Wider fix for issue where streams would play twice on some Samsung devices (#4519).
- IMA extension: Clear ads loader listeners on release (#4114).
- SmoothStreaming: Fix support for subtitles in DRM protected streams (#5378).
- FFmpeg extension: Treat invalid data errors as non-fatal to match the behavior of MediaCodec (#5293).
- GVR extension: upgrade GVR SDK dependency to 1.190.0.
- Associate fatal player errors of type SOURCE with the loading source in
AnalyticsListener.EventTime
(#5407). - Add
startPositionUs
toMediaSource.createPeriod
. This fixes an issue where using lazy preparation inConcatenatingMediaSource
with anExtractorMediaSource
overrides initial seek positions (#5350). - Add subtext to the
MediaDescriptionAdapter
of thePlayerNotificationManager
. - Add workaround for video quality problems with Amlogic decoders (#5003).
- Fix issue where sending callbacks for playlist changes may cause problems because of parallel player access (#5240).
- Fix issue with reusing a
ClippingMediaSource
with an innerExtractorMediaSource
and a non-zero start position (#5351). - Fix issue where uneven track durations in MP4 streams can cause OOM problems (#3670).
- Captions: Support PNG subtitles in SMPTE-TT (#1583).
- MPEG-TS: Use random access indicators to minimize the need for
FLAG_ALLOW_NON_IDR_KEYFRAMES
. - Downloading: Reduce time taken to remove downloads (#5136).
- MP3:
- Use the true bitrate for constant-bitrate MP3 seeking.
- Fix issue where streams would play twice on some Samsung devices (#4519).
- Fix regression where some audio formats were incorrectly marked as being unplayable due to under-reporting of platform decoder capabilities (#5145).
- Fix decode-only frame skipping on Nvidia Shield TV devices.
- Workaround for MiTV (dangal) issue when swapping output surface (#5169).
- HLS:
- MP4: Support Opus and FLAC in the MP4 container, and in DASH (#4883).
- DASH: Fix detecting the end of live events (#4780).
- Spherical video: Fall back to
TYPE_ROTATION_VECTOR
ifTYPE_GAME_ROTATION_VECTOR
is unavailable (#5119). - Support seeking for a wider range of MPEG-TS streams (#5097).
- Include channel count in audio capabilities check (#4690).
- Fix issue with applying the
show_buffering
attribute inPlayerView
(#5139). - Fix issue where null
Metadata
was output when it failed to decode (#5149). - Fix playback of some invalid but playable MP4 streams by replacing assertions with logged warnings in sample table parsing code (#5162).
- Fix UUID passed to
MediaCrypto
when usingC.CLEARKEY_UUID
before API 27.
- Add convenience methods
Player.next
,Player.previous
,Player.hasNext
andPlayer.hasPrevious
(#4863). - Improve initial bandwidth meter estimates using the current country and network type.
- IMA extension:
- For preroll to live stream transitions, project forward the loading position to avoid being behind the live window.
- Let apps specify whether to focus the skip button on ATV (#5019).
- MP3:
- DASH: Parse ProgramInformation element if present in the manifest.
- HLS:
- SubRip: Add support for alignment tags, and remove tags from the displayed captions (#4306).
- Fix issue with blind seeking to windows with non-zero offset in a
ConcatenatingMediaSource
(#4873). - Fix logic for enabling next and previous actions in
TimelineQueueNavigator
(#5065). - Fix issue where audio focus handling could not be disabled after enabling it (#5055).
- Fix issue where subtitles were positioned incorrectly if
SubtitleView
had a non-zero position offset to its parent (#4788). - Fix issue where the buffered position was not updated correctly when transitioning between periods (#4899).
- Fix issue where a
NullPointerException
is thrown when removing an unprepared media source from aConcatenatingMediaSource
with theuseLazyPreparation
option enabled (#4986). - Work around an issue where a non-empty end-of-stream audio buffer would be output with timestamp zero, causing the player position to jump backwards (#5045).
- Suppress a spurious assertion failure on some Samsung devices (#4532).
- Suppress spurious "references unknown class member" shrinking warning (#4890).
- Swap recommended order for google() and jcenter() in gradle config (#4997).
- Turn on Java 8 compiler support for the ExoPlayer library. Apps may need to
add
compileOptions { targetCompatibility JavaVersion.VERSION_1_8 }
to their gradle settings to ensure bytecode compatibility. - Set
compileSdkVersion
andtargetSdkVersion
to 28. - Support for automatic audio focus handling via
SimpleExoPlayer.setAudioAttributes
. - Add
ExoPlayer.retry
convenience method. - Add
AudioListener
for listening to changes in audio configuration during playback (#3994). - Add
LoadErrorHandlingPolicy
to allow configuration of load error handling acrossMediaSource
implementations (#3370). - Allow passing a
Looper
, which specifies the thread that must be used to access the player, when instantiating player instances usingExoPlayerFactory
(#4278). - Allow setting log level for ExoPlayer logcat output (#4665).
- Simplify
BandwidthMeter
injection: TheBandwidthMeter
should now be passed directly toExoPlayerFactory
, instead of toTrackSelection.Factory
andDataSource.Factory
. TheBandwidthMeter
is passed to the components that need it internally. TheBandwidthMeter
may also be omitted, in which case a default instance will be used. - Spherical video:
- Support for spherical video by setting
surface_type="spherical_view"
onPlayerView
. - Support for VR180.
- Support for spherical video by setting
- HLS:
- Support PlayReady.
- Add container format sniffing (#2025).
- Support alternative
EXT-X-KEY
tags. - Support
EXT-X-INDEPENDENT-SEGMENTS
in the master playlist. - Support variable substitution (#4422).
- Fix the bitrate being unset on primary track sample formats (#3297).
- Make
HlsMediaSource.Factory
take a factory of trackers instead of a tracker instance (#4814).
- DASH:
- Support
messageData
attribute for in-manifest event streams. - Clip periods to their specified durations (#4185).
- Support
- Improve seeking support for progressive streams:
- Support seeking in MPEG-TS (#966).
- Support seeking in MPEG-PS (#4476).
- Support approximate seeking in ADTS using a constant bitrate assumption
(#4548). The
FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
flag must be set on the extractor to enable this functionality. - Support approximate seeking in AMR using a constant bitrate assumption.
The
FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
flag must be set on the extractor to enable this functionality. - Add
DefaultExtractorsFactory.setConstantBitrateSeekingEnabled
to enable approximate seeking using a constant bitrate assumption on all extractors that support it.
- Video:
- Add callback to
VideoListener
to notify of surface size changes. - Improve performance when playing high frame-rate content, and when playing at greater than 1x speed (#2777).
- Scale up the initial video decoder maximum input size so playlist transitions with small increases in maximum sample size do not require reinitialization (#4510).
- Fix a bug where the player would not transition to the ended state when playing video in tunneled mode.
- Add callback to
- Audio:
- Support attaching auxiliary audio effects to the
AudioTrack
viaPlayer.setAuxEffectInfo
andPlayer.clearAuxEffectInfo
. - Support seamless adaptation while playing xHE-AAC streams. (#4360).
- Increase
AudioTrack
buffer sizes to the theoretical maximum required for each encoding for passthrough playbacks (#3803). - WAV: Fix issue where white noise would be output at the end of playback (#4724).
- MP3: Fix issue where streams would play twice on the SM-T530 (#4519).
- Support attaching auxiliary audio effects to the
- Analytics:
- Add callbacks to
DefaultDrmSessionEventListener
andAnalyticsListener
to be notified of acquired and released DRM sessions. - Add uri field to
LoadEventInfo
inMediaSourceEventListener
andAnalyticsListener
callbacks. This uri is the redirected uri if redirection occurred (#2054). - Add response headers field to
LoadEventInfo
inMediaSourceEventListener
andAnalyticsListener
callbacks (#4361 and #4615).
- Add callbacks to
- UI:
- Add option to
PlayerView
to show buffering view when playWhenReady is false (#4304). - Allow any
Drawable
to be used asPlayerView
default artwork.
- Add option to
- ConcatenatingMediaSource:
- MPEG-TS: Support CEA-608/708 in H262 (#2565).
- Allow configuration of the back buffer in
DefaultLoadControl.Builder
(#4857). - Allow apps to pass a
CacheKeyFactory
for setting custom cache keys when creating aCacheDataSource
. - Provide additional information for adaptive track selection.
TrackSelection.updateSelectedTrack
has two new parameters for the current queue of media chunks and iterators for information about upcoming chunks. - Allow
MediaCodecSelector
s to return multiple compatible decoders forMediaCodecRenderer
, and provide an (optional)MediaCodecSelector
that falls back to less preferred decoders likeMediaCodec.createDecoderByType
(#273). - Enable gzip for requests made by
SingleSampleMediaSource
(#4771). - Fix bug reporting buffered position for multi-period windows, and add
convenience methods
Player.getTotalBufferedDuration
andPlayer.getContentBufferedDuration
(#4023). - Fix bug where transitions to clipped media sources would happen too early (#4583).
- Fix bugs reporting events for multi-period media sources (#4492 and #4634).
- Fix issue where removing looping media from a playlist throws an exception (#4871).
- Fix issue where the preferred audio or text track would not be selected if mapped onto a secondary renderer of the corresponding type (#4711).
- Fix issue where errors of upcoming playlist items are thrown too early (#4661).
- Allow edit lists which do not start with a sync sample. (#4774).
- Fix issue with audio discontinuities at period transitions, e.g. when looping (#3829).
- Fix issue where
player.getCurrentTag()
throws anIndexOutOfBoundsException
(#4822). - Fix bug preventing use of multiple key session support (
multiSession=true
) for non-WidevineDefaultDrmSessionManager
instances (#4834). - Fix issue where audio and video would desynchronize when playing concatenations of gapless content (#4559).
- IMA extension:
- MediaSession extension:
- Add
MediaSessionConnector.setCustomErrorMessage
to support setting custom error messages. - Add
MediaMetadataProvider
to support setting custom metadata (#3497).
- Add
- Cronet extension: Now distributed via jCenter.
- FFmpeg extension: Support mu-law and A-law PCM.
- IMA extension:
- Fix behavior when creating/releasing the player then releasing
ImaAdsLoader
(#3879). - Add support for setting slots for companion ads.
- Fix behavior when creating/releasing the player then releasing
- Captions:
- DASH:
- DRM: Allow DrmInitData to carry a license server URL (#3393).
- MPEG-TS: Fix bug preventing SCTE-35 cues from being output (#4573).
- Expose all internal ID3 data stored in MP4 udta boxes, and switch from using CommentFrame to InternalFrame for frames with gapless metadata in MP4.
- Add
PlayerView.isControllerVisible
(#4385). - Fix issue playing DRM protected streams on Asus Zenfone 2 (#4403).
- Add support for multiple audio and video tracks in MPEG-PS streams (#4406).
- Add workaround for track index mismatches between trex and tkhd boxes in fragmented MP4 files (#4477).
- Add workaround for track index mismatches between tfhd and tkhd boxes in fragmented MP4 files (#4083).
- Ignore all MP4 edit lists if one edit list couldn't be handled (#4348).
- Fix issue when switching track selection from an embedded track to a primary track in DASH (#4477).
- Fix accessibility class name for
DefaultTimeBar
(#4611). - Improved compatibility with FireOS devices.
- IMA extension: Don't advertise support for video/mpeg ad media, as we don't have an extractor for this (#4297).
- DASH: Fix playback getting stuck when playing representations that have both sidx atoms and non-zero presentationTimeOffset values.
- HLS:
- Allow injection of custom playlist trackers.
- Fix adaptation in live playlists with EXT-X-PROGRAM-DATE-TIME tags.
- Mitigate memory leaks when
MediaSource
loads are slow to cancel (#4249). - Fix inconsistent
Player.EventListener
invocations for recursive player state changes (#4276). - Fix
MediaCodec.native_setSurface
crash on Moto C (#4315). - Fix missing whitespace in CEA-608 (#3906).
- Fix crash downloading HLS media playlists (#4396).
- Fix a bug where download cancellation was ignored (#4403).
- Set
METADATA_KEY_TITLE
on media descriptions (#4292). - Allow apps to register custom MIME types (#4264).
- HLS:
- OkHttp extension: Fix to correctly include response headers in thrown
InvalidResponseCodeException
s. - Add possibility to cancel
PlayerMessage
s. - UI:
- Add
PlayerView.setKeepContentOnPlayerReset
to keep the currently displayed video frame or media artwork visible when the player is reset (#2843).
- Add
- Fix crash when switching surface on Moto E(4) (#4134).
- Fix a bug that could cause event listeners to be called with inconsistent information if an event listener interacted with the player (#4262).
- Audio:
- Captions:
- TTML:
- Fix a styling issue when there are multiple regions displayed at the same time that can make text size of each region much smaller than defined.
- Fix an issue when the caption line has no text (empty line or only line break), and the line's background is still displayed.
- Support TTML font size using % correctly (as percentage of document cell resolution).
- Downloading:
- Add
DownloadService
,DownloadManager
and related classes (#2643). Information on using these components to download progressive formats can be found here. To see how to download DASH, HLS and SmoothStreaming media, take a look at the app. - Updated main demo app to support downloading DASH, HLS, SmoothStreaming and progressive media.
- Add
- MediaSources:
- Allow reusing media sources after they have been released and also in parallel to allow adding them multiple times to a concatenation. (#3498).
- Merged
DynamicConcatenatingMediaSource
intoConcatenatingMediaSource
and deprecatedDynamicConcatenatingMediaSource
. - Allow clipping of child media sources where the period and window have a
non-zero offset with
ClippingMediaSource
. - Allow adding and removing
MediaSourceEventListener
s to MediaSources after they have been created. Listening to events is now supported for all media sources including composite sources. - Added callbacks to
MediaSourceEventListener
to get notified when media periods are created, released and being read from. - Support live stream clipping with
ClippingMediaSource
. - Allow setting tags for all media sources in their factories. The tag of
the current window can be retrieved with
Player.getCurrentTag
.
- UI:
- Add support for displaying error messages and a buffering spinner in
PlayerView
. - Add support for listening to
AspectRatioFrameLayout
's aspect ratio update (#3736). - Add
PlayerNotificationManager
for displaying notifications reflecting the player state. - Add
TrackSelectionView
for selecting tracks withDefaultTrackSelector
. - Add
TrackNameProvider
for converting trackFormat
s to textual descriptions, andDefaultTrackNameProvider
as a default implementation.
- Add support for displaying error messages and a buffering spinner in
- Track selection:
- Reworked
MappingTrackSelector
andDefaultTrackSelector
. DefaultTrackSelector.Parameters
now implementsParcelable
.- Added UI components for track selection (see above).
- Reworked
- Audio:
- Support extracting data from AMR container formats, including both narrow and wide band (#2527).
- FLAC:
- Sniff FLAC files correctly if they have ID3 headers (#4055).
- Supports FLAC files with high sample rate (176400 and 192000) (#3769).
- Factor out
AudioTrack
position tracking fromDefaultAudioSink
. - Fix an issue where the playback position would pause just after playback begins, and poll the audio timestamp less frequently once it starts advancing (#3841).
- Add an option to skip silent audio in
PlaybackParameters
(#2635). - Fix an issue where playback of TrueHD streams would get stuck after seeking due to not finding a syncframe (#3845).
- Fix an issue with eac3-joc playback where a codec would fail to configure (#4165).
- Handle non-empty end-of-stream buffers, to fix gapless playback of streams with encoder padding when the decoder returns a non-empty final buffer.
- Allow trimming more than one sample when applying an elst audio edit via gapless playback info.
- Allow overriding skipping/scaling with custom
AudioProcessor
s (#3142).
- Caching:
- Add release method to the
Cache
interface, and prevent multiple instances ofSimpleCache
using the same folder at the same time. - Cache redirect URLs (#2360).
- Add release method to the
- DRM:
- HLS:
- Fix playlist loading error propagation when the current selection does not include all of the playlist's variants.
- Fix SAMPLE-AES-CENC and SAMPLE-AES-CTR EXT-X-KEY methods (#4145).
- Preeptively declare an ID3 track in chunkless preparation (#4016).
- Add support for multiple #EXT-X-MAP tags in a media playlist (#4164).
- Fix seeking in live streams (#4187).
- IMA extension:
- Allow setting the ad media load timeout (#3691).
- Expose ad load errors via
MediaSourceEventListener
onAdsMediaSource
, and allow setting an ad event listener onImaAdsLoader
. Deprecate theAdsMediaSource.EventListener
.
- Add
AnalyticsListener
interface which can be registered inSimpleExoPlayer
to receive detailed metadata for each ExoPlayer event. - Optimize seeking in FMP4 by enabling seeking to the nearest sync sample within a fragment. This benefits standalone FMP4 playbacks, DASH and SmoothStreaming.
- Updated default max buffer length in
DefaultLoadControl
. - Fix ClearKey decryption error if the key contains a forward slash (#4075).
- Fix crash when switching surface on Huawei P9 Lite (#4084), and Philips QM163E (#4104).
- Support ZLIB compressed PGS subtitles.
- Added
getPlaybackError
toPlayer
interface. - Moved initial bitrate estimate from
AdaptiveTrackSelection
toDefaultBandwidthMeter
. - Removed default renderer time offset of 60000000 from internal player. The
actual renderer timestamp offset can be obtained by listening to
BaseRenderer.onStreamChanged
. - Added dependencies on checkerframework annotations for static code analysis.
- Fix ProGuard configuration for Cast, IMA and OkHttp extensions.
- Update OkHttp extension to depend on OkHttp 3.10.0.
- Gradle: Upgrade Gradle version from 4.1 to 4.4 so it can work with Android Studio 3.1 (#3708).
- Match codecs starting with "mp4a" to different Audio MimeTypes (#3779).
- Fix ANR issue on Redmi 4X and Redmi Note 4 (#4006).
- Fix handling of zero padded strings when parsing Matroska streams (#4010).
- Fix "Decoder input buffer too small" error when playing some FLAC streams.
- MediaSession extension: Omit fast forward and rewind actions when media is not seekable (#4001).
- Gradle: Replaced 'compile' (deprecated) with 'implementation' and 'api'. This may lead to build breakage for applications upgrading from previous version that rely on indirect dependencies of certain modules. In such cases, application developers need to add the missing dependency to their gradle file. You can read more about the new dependency configurations here.
- HlsMediaSource: Make HLS periods start at zero instead of the epoch.
Applications that rely on HLS timelines having a period starting at the
epoch will need to update their handling of HLS timelines. The program date
time is still available via the informational
Timeline.Window.windowStartTimeMs
field (#3865, #3888). - Enable seeking in MP4 streams where duration is set incorrectly in the track header (#3926).
- Video: Force rendering a frame periodically in
MediaCodecVideoRenderer
andLibvpxVideoRenderer
, even if it is late.
- Player interface:
- Add optional parameter to
stop
to reset the player when stopping. - Add a reason to
EventListener.onTimelineChanged
to distinguish between initial preparation, reset and dynamic updates. - Add
Player.DISCONTINUITY_REASON_AD_INSERTION
to the possible reasons reported inEventlistener.onPositionDiscontinuity
to distinguish transitions to and from ads within one period from transitions between periods. - Replaced
ExoPlayer.sendMessages
withExoPlayer.createMessage
to allow more customization of the message. Now supports setting a message delivery playback position and/or a delivery handler (#2189). - Add
Player.VideoComponent
,Player.TextComponent
andPlayer.MetadataComponent
interfaces that define optional video, text and metadata output functionality. NewgetVideoComponent
,getTextComponent
andgetMetadataComponent
methods provide access to this functionality.
- Add optional parameter to
- Add
ExoPlayer.setSeekParameters
for controlling how seek operations are performed. TheSeekParameters
class contains defaults for exact seeking and seeking to the closest sync points before, either side or after specified seek positions.SeekParameters
are not currently supported when playing HLS streams. - DefaultTrackSelector:
- Replace
DefaultTrackSelector.Parameters
copy methods with a builder. - Support disabling of individual text track selection flags.
- Replace
- Buffering:
- Allow a back-buffer of media to be retained behind the current playback
position, for fast backward seeking. The back-buffer can be configured
by custom
LoadControl
implementations. - Add ability for
SequenceableLoader
to re-evaluate its buffer and discard buffered media so that it can be re-buffered in a different quality. - Allow more flexible loading strategy when playing media containing
multiple sub-streams, by allowing injection of custom
CompositeSequenceableLoader
factories throughDashMediaSource.Factory
,HlsMediaSource.Factory
,SsMediaSource.Factory
, andMergingMediaSource
. - Play out existing buffer before retrying for progressive live streams (#1606).
- Allow a back-buffer of media to be retained behind the current playback
position, for fast backward seeking. The back-buffer can be configured
by custom
- UI:
- Generalized player and control views to allow them to bind with any
Player
, and renamed them toPlayerView
andPlayerControlView
respectively. - Made
PlayerView
automatically apply video rotation when configured to useTextureView
(#91). - Made
PlayerView
play button behave correctly when the player is ended (#3689), and call aPlaybackPreparer
when the player is idle.
- Generalized player and control views to allow them to bind with any
- DRM: Optimistically attempt playback of DRM protected content that does not declare scheme specific init data in the manifest. If playback of clear samples without keys is allowed, delay DRM session error propagation until keys are actually needed (#3630).
- DASH:
- Support in-band Emsg events targeting the player with scheme id
urn:mpeg:dash:event:2012
and scheme values "1", "2" and "3". - Support EventStream elements in DASH manifests.
- Support in-band Emsg events targeting the player with scheme id
- HLS:
- Add opt-in support for chunkless preparation in HLS. This allows an HLS source to finish preparation without downloading any chunks, which can significantly reduce initial buffering time (#3149). More details can be found here.
- Fail if unable to sync with the Transport Stream, rather than entering stuck in an indefinite buffering state.
- Fix mime type propagation (#3653).
- Fix ID3 context reuse across segment format changes (#3622).
- Use long for media sequence numbers (#3747)
- Add initial support for the EXT-X-GAP tag.
- Audio:
- Captions:
- Caching:
- Fix cache corruption issue (#3762).
- Implement periodic check in
CacheDataSource
to see whether it's possible to switch to reading/writing the cache having initially bypassed it.
- IMA extension:
- Fix the player getting stuck when an ad group fails to load (#3584).
- Work around loadAd not being called beore the LOADED AdEvent arrives (#3552).
- Handle asset mismatch errors (#3801).
- Add support for playing non-Extractor content MediaSources in the IMA demo app (#3676).
- Fix handling of ad tags where ad groups are out of order (#3716).
- Fix handling of ad tags with only preroll/postroll ad groups (#3715).
- Propagate ad media preparation errors to IMA so that the ads can be skipped.
- Handle exceptions in IMA callbacks so that can be logged less verbosely.
- New Cast extension. Simplifies toggling between local and Cast playbacks.
EventLogger
moved from the demo app into the core library.- Fix ANR issue on the Huawei P8 Lite, Huawei Y6II, Moto C+, Meizu M5C, Lenovo K4 Note and Sony Xperia E5. (#3724, #3835).
- Fix potential NPE when removing media sources from a DynamicConcatenatingMediaSource (#3796).
- Check
sys.display-size
on Philips ATVs (#3807). - Release
Extractor
s on the loading thread to avoid potentially leaking resources when the playback thread has quit by the time the loading task has completed. - ID3: Better handle malformed ID3 data (#3792).
- Support 14-bit mode and little endianness in DTS PES packets (#3340).
- Demo app: Add ability to download not DRM protected content.
- Add factories to
ExtractorMediaSource
,HlsMediaSource
,SsMediaSource
,DashMediaSource
andSingleSampleMediaSource
. - Use the same listener
MediaSourceEventListener
for all MediaSource implementations. - IMA extension:
- Support non-ExtractorMediaSource ads (#3302).
- Skip ads before the ad preceding the player's initial seek position (#3527).
- Fix ad loading when there is no preroll.
- Add an option to turn off hiding controls during ad playback (#3532).
- Support specifying an ads response instead of an ad tag (#3548).
- Support overriding the ad load timeout (#3556).
- DASH: Support time zone designators in ISO8601 UTCTiming elements (#3524).
- Audio:
- Support 32-bit PCM float output from
DefaultAudioSink
, and add an option to use this withFfmpegAudioRenderer
. - Add support for extracting 32-bit WAVE files (#3379).
- Support extraction and decoding of Dolby Atmos (#2465).
- Fix handling of playback parameter changes while paused when followed by a seek.
- Support 32-bit PCM float output from
- SimpleExoPlayer: Allow multiple audio and video debug listeners.
- DefaultTrackSelector: Support undefined language text track selection when the preferred language is not available (#2980).
- Add options to
DefaultLoadControl
to set maximum buffer size in bytes and to choose whether size or time constraints are prioritized. - Use surfaceless context for secure
DummySurface
, if available (#3558). - FLV: Fix playback of live streams that do not contain an audio track (#3188).
- CEA-608: Fix handling of row count changes in roll-up mode (#3513).
- Prevent period transitions when seeking to the end of a period when paused (#2439).
- Removed "r" prefix from versions. This release is "2.6.0", not "r2.6.0".
- New
Player.DefaultEventListener
abstract class can be extended to avoid having to implement all methods defined byPlayer.EventListener
. - Added a reason to
EventListener.onPositionDiscontinuity
(#3252). - New
setShuffleModeEnabled
method for enabling shuffled playback. - SimpleExoPlayer: Support for multiple video, text and metadata outputs.
- Support for
Renderer
s that don't consume any media (#3212). - Fix reporting of internal position discontinuities via
Player.onPositionDiscontinuity
.DISCONTINUITY_REASON_SEEK_ADJUSTMENT
is added to disambiguate position adjustments during seeks from other types of internal position discontinuity. - Fix potential
IndexOutOfBoundsException
when callingExoPlayer.getDuration
(#3362). - Fix playbacks involving looping, concatenation and ads getting stuck when media contains tracks with uneven durations (#1874).
- Fix issue with
ContentDataSource
when reading from certainContentProvider
implementations (#3426). - Better playback experience when the video decoder cannot keep up, by skipping to key-frames. This is particularly relevant for variable speed playbacks.
- Allow
SingleSampleMediaSource
to suppress load errors (#3140). DynamicConcatenatingMediaSource
: Allow specifying a callback to be invoked after a dynamic playlist modification has been applied (#3407).- Audio: New
AudioSink
interface allows customization of audio output path. - Offline: Added
Downloader
implementations for DASH, HLS, SmoothStreaming and progressive streams. - Track selection:
- Fixed adaptive track selection logic for live playbacks (#3017).
- Added ability to select the lowest bitrate tracks.
- DASH:
- Don't crash when a malformed or unexpected manifest update occurs (#2795).
- HLS:
- Support for Widevine protected FMP4 variants.
- Support CEA-608 in FMP4 variants.
- Support extractor injection (#2748).
- DRM:
- Improved compatibility with ClearKey content (#3138).
- Support multiple PSSH boxes of the same type.
- Retry initial provisioning and key requests if they fail
- Fix incorrect parsing of non-CENC sinf boxes.
- IMA extension:
- UI:
- New Leanback extension: Simplifies binding Exoplayer to Leanback UI components.
- Unit tests moved to Robolectric.
- Misc bugfixes.
- Remove unnecessary media playlist fetches during playback of live HLS streams.
- Add the ability to inject a HLS playlist parser through
HlsMediaSource
. - Fix potential
IndexOutOfBoundsException
when usingImaMediaSource
(#3334). - Fix an issue parsing MP4 content containing non-CENC sinf boxes.
- Fix memory leak when seeking with repeated periods.
- Fix playback position when
ExoPlayer.prepare
is called withresetPosition
set to false. - Ignore MP4 edit lists that seem invalid (#3351).
- Add extractor flag for ignoring all MP4 edit lists (#3358).
- Improve extensibility by exposing public constructors for
FrameworkMediaCrypto
and by makingDefaultDashChunkSource.getNextChunk
non-final.
- IMA extension: Support skipping of skippable ads on AndroidTV and other non-touch devices (#3258).
- HLS: Fix broken WebVTT captions when PTS wraps around (#2928).
- Captions: Fix issues rendering CEA-608 captions (#3250).
- Workaround broken AAC decoders on Galaxy S6 (#3249).
- Caching: Fix infinite loop when cache eviction fails (#3260).
- Caching: Force use of BouncyCastle on JellyBean to fix decryption issue (#2755).
- IMA extension: Fix issue where ad playback could end prematurely for some content types (#3180).
- RTMP extension: Fix SIGABRT on fast RTMP stream restart (#3156).
- UI: Allow app to manually specify ad markers (#3184).
- DASH: Expose segment indices to subclasses of DefaultDashChunkSource (#3037).
- Captions: Added robustness against malformed WebVTT captions (#3228).
- DRM: Support forcing a specific license URL.
- Fix playback error when seeking in media loaded through content:// URIs (#3216).
- Fix issue playing MP4s in which the last atom specifies a size of zero (#3191).
- Workaround playback failures on some Xiaomi devices (#3171).
- Workaround SIGSEGV issue on some devices when setting and swapping surface for secure playbacks (#3215).
- Workaround for Nexus 7 issue when swapping output surface (#3236).
- Workaround for SimpleExoPlayerView's surface not being hidden properly (#3160).
- Fix an issue that could cause the reported playback position to stop advancing in some cases.
- Fix an issue where a Surface could be released whilst still in use by the player.
- IMA extension: Wraps the Google Interactive Media Ads (IMA) SDK to provide an easy and seamless way of incorporating display ads into ExoPlayer playbacks. You can read more about the IMA extension here.
- MediaSession extension: Provides an easy way to connect ExoPlayer with MediaSessionCompat in the Android Support Library.
- RTMP extension: An extension for playing streams over RTMP.
- Build: Made it easier for application developers to depend on a local checkout of ExoPlayer. You can learn how to do this here.
- Core playback improvements:
- Eliminated re-buffering when changing audio and text track selections during playback of progressive streams (#2926).
- New DynamicConcatenatingMediaSource class to support playback of dynamic playlists.
- New ExoPlayer.setRepeatMode method for dynamic toggling of repeat mode during playback. Use of setRepeatMode should be preferred to LoopingMediaSource for most looping use cases. You can read more about setRepeatMode here.
- Eliminated jank when switching video playback from one Surface to another on API level 23+ for unencrypted content, and on devices that support the EGL_EXT_protected_content OpenGL extension for protected content (#677).
- Enabled ExoPlayer instantiation on background threads without Loopers. Events from such players are delivered on the application's main thread.
- HLS improvements:
- Optimized adaptive switches for playlists that specify the EXT-X-INDEPENDENT-SEGMENTS tag.
- Optimized in-buffer seeking (#551).
- Eliminated re-buffering when changing audio and text track selections during playback, provided the new selection does not require switching to different renditions (#2718).
- Exposed all media playlist tags in ExoPlayer's MediaPlaylist object.
- DASH: Support for seamless switching across streams in different AdaptationSet elements (#2431).
- DRM: Support for additional crypto schemes (cbc1, cbcs and cens) on API level 24+ (#1989).
- Captions: Initial support for SSA/ASS subtitles (#889).
- AndroidTV: Fixed issue where tunneled video playback would not start on some devices (#2985).
- MPEG-TS: Fixed segmentation issue when parsing H262 (#2891).
- Cronet extension: Support for a user-defined fallback if Cronet library is not present.
- Fix buffer too small IllegalStateException issue affecting some composite media playbacks (#2900).
- Misc bugfixes.
- HLS/MPEG-TS: Some initial optimizations of MPEG-TS extractor performance (#3040).
- HLS: Fix propagation of format identifier for CEA-608 (#3033).
- HLS: Detect playlist stuck and reset conditions (#2872).
- Video: Fix video dimension reporting on some devices (#3007).
- Audio: Workaround custom audio decoders misreporting their maximum supported channel counts (#2940).
- Audio: Workaround for broken MediaTek raw decoder on some devices (#2873).
- Captions: Fix TTML captions appearing at the top of the screen (#2953).
- Captions: Fix handling of some DVB subtitles (#2957).
- Track selection: Fix setSelectionOverride(index, tracks, null) (#2988).
- GVR extension: Add support for mono input (#2710).
- FLAC extension: Fix failing build (#2977).
- Misc bugfixes.
- Stability: Work around Nexus 10 reboot when playing certain content (#2806).
- MP3: Correctly treat MP3s with INFO headers as constant bitrate (#2895).
- HLS: Use average rather than peak bandwidth when available (#2863).
- SmoothStreaming: Fix timeline for live streams (#2760).
- UI: Fix DefaultTimeBar invalidation (#2871).
- Misc bugfixes.
- Stability: Avoid OutOfMemoryError in extractors when parsing malformed media (#2780).
- Stability: Avoid native crash on Galaxy Nexus. Avoid unnecessarily large codec input buffer allocations on all devices (#2607).
- Variable speed playback: Fix interpolation for rate/pitch adjustment (#2774).
- HLS: Include EXT-X-DATERANGE tags in HlsMediaPlaylist.
- HLS: Don't expose CEA-608 track if CLOSED-CAPTIONS=NONE (#2743).
- HLS: Correctly propagate errors loading the media playlist (#2623).
- UI: DefaultTimeBar enhancements and bug fixes (#2740).
- Ogg: Fix failure to play some Ogg files (#2782).
- Captions: Don't select text tack with no language by default.
- Captions: TTML positioning fixes (#2824).
- Misc bugfixes.
- New modular library structure. You can read more about depending on individual library modules here.
- Variable speed playback support on API level 16+. You can read more about changing the playback speed here (#26).
- New time bar view, including support for displaying ad break markers.
- Support DVB subtitles in MPEG-TS and MKV.
- Support adaptive playback for audio only DASH, HLS and SmoothStreaming (#1975).
- Support for setting extractor flags on DefaultExtractorsFactory (#2657).
- Support injecting custom renderers into SimpleExoPlayer using a new RenderersFactory interface.
- Correctly set ExoPlayer's internal thread priority to
THREAD_PRIORITY_AUDIO
. - TX3G: Support styling and positioning.
- FLV:
- Support MP3 in FLV.
- Skip unhandled metadata rather than failing (#2634).
- Fix potential OutOfMemory errors.
- ID3: Better handle malformed ID3 data (#2604, #2663).
- FFmpeg extension: Fixed build instructions (#2561).
- VP9 extension: Reduced binary size.
- FLAC extension: Enabled 64 bit targets.
- Misc bugfixes.
- Fix NPE enabling WebVTT subtitles in DASH streams (#2596).
- Fix skipping to keyframes when MediaCodecVideoRenderer is enabled but without a Surface (#2575).
- Minor fix for CEA-708 decoder (#2595).
- GVR extension: Wraps the Google VR Audio SDK to provide spatial audio rendering. You can read more about the GVR extension here.
- DASH improvements:
- HLS improvements:
- Respect initial track selection (#2353).
- Reduced frequency of media playlist requests when playback position is close to the live edge (#2548).
- Exposed the master playlist through ExoPlayer.getCurrentManifest() (#2537).
- Support CLOSED-CAPTIONS #EXT-X-MEDIA type (#341).
- Fixed handling of negative values in #EXT-X-SUPPORT (#2495).
- Fixed potential endless buffering state for streams with WebVTT subtitles (#2424).
- MPEG-TS improvements:
- Support for multiple programs.
- Support for multiple closed captions and caption service descriptors (#2161).
- MP3: Add
FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
extractor option to enable constant bitrate seeking in MP3 files that would otherwise be unseekable (#2445). - ID3: Better handle malformed ID3 data (#2486).
- Track selection: Added maxVideoBitrate parameter to DefaultTrackSelector.
- DRM: Add support for CENC ClearKey on API level 21+ (#2361).
- DRM: Support dynamic setting of key request headers (#1924).
- SmoothStreaming: Fixed handling of start_time placeholder (#2447).
- FLAC extension: Fix proguard configuration (#2427).
- Misc bugfixes.
- Demo app: Automatic recovery from BehindLiveWindowException, plus improved handling of pausing and resuming live streams (#2344).
- AndroidTV: Added Support for tunneled video playback (#1688).
- DRM: Renamed StreamingDrmSessionManager to DefaultDrmSessionManager and added support for using offline licenses (#876).
- DRM: Introduce OfflineLicenseHelper to help with offline license acquisition, renewal and release.
- UI: Updated player control assets. Added vector drawables for use on API level 21 and above.
- UI: Made player control seek bar work correctly with key events if focusable (#2278).
- HLS: Improved support for streams that use EXT-X-DISCONTINUITY without EXT-X-DISCONTINUITY-SEQUENCE (#1789).
- HLS: Support for EXT-X-START tag (#1544).
- HLS: Check #EXTM3U header is present when parsing the playlist. Fail gracefully if not (#2301).
- HLS: Fix memory leak (#2319).
- HLS: Fix non-seamless first adaptation where master playlist omits resolution tags (#2096).
- HLS: Fix handling of WebVTT subtitle renditions with non-standard segment file extensions (#2025 and #2355).
- HLS: Better handle inconsistent HLS playlist update (#2249).
- DASH: Don't overflow when dealing with large segment numbers (#2311).
- DASH: Fix propagation of language from the manifest (#2335).
- SmoothStreaming: Work around "Offset to sample data was negative" failures (#2292, #2101 and #1152).
- MP3/ID3: Added support for parsing Chapter and URL link frames (#2316).
- MP3/ID3: Handle ID3 frames that end with empty text field (#2309).
- Added ClippingMediaSource for playing clipped portions of media (#1988).
- Added convenience methods to query whether the current window is dynamic and seekable (#2320).
- Support setting of default headers on HttpDataSource.Factory implementations (#2166).
- Fixed cache failures when using an encrypted cache content index.
- Fix visual artifacts when switching output surface (#2093).
- Fix gradle + proguard configurations.
- Fix player position when replacing the MediaSource (#2369).
- Misc bug fixes, including #2330, #2269, #2252, #2264 and #2290.
- Fix some subtitle types (e.g. WebVTT) being displayed out of sync (#2208).
- Fix incorrect position reporting for on-demand HLS media that includes EXT-X-PROGRAM-DATE-TIME tags (#2224).
- Fix issue where playbacks could get stuck in the initial buffering state if over 1MB of data needs to be read to initialize the playback.
- HLS: Support for seeking in live streams (#87).
- HLS: Improved support:
- Support for EXT-X-PROGRAM-DATE-TIME (#747).
- Improved handling of sample timestamps and their alignment across variants and renditions.
- Fix issue that could cause playbacks to get stuck in an endless initial buffering state.
- Correctly propagate BehindLiveWindowException instead of IndexOutOfBoundsException exception (#1695).
- MP3/MP4: Support for ID3 metadata, including embedded album art (#979).
- Improved customization of UI components. You can read about customization of ExoPlayer's UI components here.
- Robustness improvements when handling MediaSource timeline changes and MediaPeriod transitions.
- CEA-608: Support for caption styling and positioning.
- MPEG-TS: Improved support:
- Support injection of custom TS payload readers.
- Support injection of custom section payload readers.
- Support SCTE-35 splice information messages.
- Support multiple table sections in a single PSI section.
- Fix NullPointerException when an unsupported stream type is encountered (#2149).
- Avoid failure when expected ID3 header not found (#1966).
- Improvements to the upstream cache package.
- Support caching of media segments for DASH, HLS and SmoothStreaming. Note that caching of manifest and playlist files is still not supported in the (normal) case where the corresponding responses are compressed.
- Support caching for ExtractorMediaSource based playbacks.
- Improved flexibility of SimpleExoPlayer (#2102).
- Fix issue where only the audio of a video would play due to capability detection issues (#2007, #2034 and #2157).
- Fix issues that could cause ExtractorMediaSource based playbacks to get stuck buffering (#1962).
- Correctly set SimpleExoPlayerView surface aspect ratio when an active player is attached (#2077).
- OGG: Fix playback of short OGG files (#1976).
- MP4: Support
.mp3
tracks (#2066). - SubRip: Don't fail playbacks if SubRip file contains negative timestamps (#2145).
- Misc bugfixes.
- Fix crash on Jellybean devices when using playback controls (#1965).
- Fixed NullPointerException in ExtractorMediaSource (#1914).
- Fixed NullPointerException in HlsMediaPeriod (#1907).
- Fixed memory leak in PlaybackControlView (#1908).
- Fixed strict mode violation when using SimpleExoPlayer.setVideoPlayerTextureView().
- Fixed L3 Widevine provisioning (#1925).
- Fixed hiding of controls with use_controller="false" (#1919).
- Improvements to Cronet network stack extension.
- Misc bug fixes.
- Fixes for MergingMediaSource and sideloaded subtitles. (#1882, #1854, #1900).
- Reduced effect of application code leaking player references (#1855).
- Initial support for fragmented MP4 in HLS.
- Misc bug fixes and minor features.
- Fix playback of short duration content (#1837).
- Fix MergingMediaSource preparation issue (#1853).
- Fix live stream buffering (out of memory) issue (#1825).
ExoPlayer 2.x is a major iteration of the library. It includes significant API and architectural changes, new features and many bug fixes. You can read about some of the motivations behind ExoPlayer 2.x here.
- Root package name changed to
com.google.android.exoplayer2
. The library structure and class names have also been sanitized. Read more here. - Key architectural changes:
- Late binding between rendering and media source components. Allows the same rendering components to be re-used from one playback to another. Enables features such as gapless playback through playlists and DASH multi-period support.
- Improved track selection design. More details can be found here.
- LoadControl now used to control buffering and loading across all playback types.
- Media source components given additional structure. A new MediaSource class has been introduced. MediaSources expose Timelines that describe the media they expose, and can consist of multiple MediaPeriods. This enables features such as seeking in live playbacks and DASH multi-period support.
- Responsibility for loading the initial DASH/SmoothStreaming/HLS manifest is promoted to the corresponding MediaSource components and is no longer the application's responsibility.
- Higher level abstractions such as SimpleExoPlayer have been added to the library. These make the library easier to use for common use cases. The demo app is halved in size as a result, whilst at the same time gaining more functionality. Read more here.
- Enhanced library support for implementing audio extensions. Read more here.
- Format and MediaFormat are replaced by a single Format class.
- Key new features:
- Playlist support. Includes support for gapless playback between playlist items and consistent application of LoadControl and TrackSelector policies when transitioning between items (#1270).
- Seeking in live playbacks for DASH and SmoothStreaming (#291).
- DASH multi-period support (#557).
- MediaSource composition allows MediaSources to be concatenated into a playlist, merged and looped. Read more here.
- Looping support (see above) (#490).
- Ability to query information about all tracks in a piece of media (including those not supported by the device) (#1121).
- Improved player controls.
- Support for PSSH in fMP4 moof atoms (#1143).
- Support for Opus in Ogg (#1447).
- CacheDataSource support for standalone media file playbacks (mp3, mp4 etc).
- FFMPEG extension (for audio only).
- Key bug fixes:
Note: Since ExoPlayer V1 is still being maintained alongside V2, there is some overlap between these notes and the notes above. r2.0.0 followed from r1.5.11, and hence it can be assumed that all changes in r1.5.11 and earlier are included in all V2 releases. This cannot be assumed for changes in r1.5.12 and later, however it can be assumed that all such changes are included in the most recent V2 release.
- VP9 extension: Reduced binary size.
- FLAC extension: Enabled 64 bit targets and fixed proguard config.
- Misc bugfixes.
- SmoothStreaming: Fixed handling of start_time placeholder (#2447).
- Misc bugfixes.
- Fixed cache failures when using an encrypted cache content index.
- SmoothStreaming: Work around "Offset to sample data was negative" failures (#2292, #2101 and #1152).
- Improvements to the upstream cache package.
- MP4: Support
.mp3
tracks (#2066). - SubRip: Don't fail playbacks if SubRip file contains negative timestamps (#2145).
- MPEG-TS: Avoid failure when expected ID3 header not found (#1966).
- Misc bugfixes.
- Improvements to Cronet network stack extension.
- Fix bug in demo app introduced in r1.5.11 that caused L3 Widevine provisioning requests to fail.
- Misc bugfixes.
- Cronet network stack extension.
- HLS: Fix propagation of language for alternative audio renditions (#1784).
- WebM: Support for subsample encryption.
- ID3: Fix EOS detection for 2-byte encodings (#1774).
- MPEG-TS: Support multiple tracks of the same type.
- MPEG-TS: Work toward robust handling of stream corruption.
- Fix ContentDataSource failures triggered by garbage collector (#1759).
- HLS: Stability fixes.
- MP4: Support for stz2 Atoms.
- Enable 4K format selection on Sony AndroidTV + nVidia SHIELD.
- TX3G caption fixes.
- MP4: Fixed incorrect sniffing in some cases (#1523).
- MP4: Improved file compatibility (#1567).
- ID3: Support for TIT2 and APIC frames.
- Fixed querying of platform decoders on some devices.
- Misc bug fixes.
- HLS: Fix handling of HTTP redirects.
- Audio: Minor adjustment to improve A/V sync.
- OGG: Support FLAC in OGG.
- TTML: Support regions.
- WAV/PCM: Support 8, 24 and 32-bit WAV and PCM audio.
- Misc bug fixes and performance optimizations.
- OGG: Support added for OGG.
- FLAC: Support for FLAC extraction and playback (via an extension).
- HLS: Multiple audio track support (via Renditions).
- FMP4: Support multiple tracks in fragmented MP4 (not applicable to DASH/SmoothStreaming).
- WAV: Support for 16-bit WAV files.
- MKV: Support non-square pixel formats.
- Misc bug fixes.
- MP3: Fix mono streams playing at 2x speed on some MediaTek based devices (#801).
- MP3: Fix playback of some streams when stream length is unknown.
- ID3: Support multiple frames of the same type in a single tag.
- CEA-608: Correctly handle repeated control characters, fixing an issue in which captions would immediately disappear.
- AVC3: Fix decoder failures on some MediaTek devices in the case where the first buffer fed to the decoder does not start with SPS/PPS NAL units.
- Misc bug fixes.
- DASH: Enable MP4 embedded WebVTT playback (#1185)
- HLS: Fix handling of extended ID3 tags in MPEG-TS (#1181)
- MP3: Fix incorrect position calculation in VBRI header (#1197)
- Fix issue seeking backward using SingleSampleSource (#1193)
- HLS: Support for variant selection and WebVtt subtitles.
- MP4: Support for embedded WebVtt.
- Improved device compatibility.
- Fix for resource leak (Issue #1066).
- Misc bug fixes + minor features.
- Support for FLV (without seeking).
- MP4: Fix for playback of media containing basic edit lists.
- QuickTime: Fix parsing of QuickTime style audio sample entry.
- HLS: Add H262 support for devices that have an H262 decoder.
- Allow AudioTrack PlaybackParams (e.g. speed/pitch) on API level 23+.
- Correctly detect 4K displays on API level 23+.
- Misc bug fixes.
- MPEG-TS/HLS: Fix frame drops playing H265 video.
- SmoothStreaming: Fix parsing of ProtectionHeader.
- Enable smooth frame release by default.
- Added OkHttpDataSource extension.
- AndroidTV: Correctly detect 4K display size on Bravia devices.
- FMP4: Handle non-sample data in mdat boxes.
- TTML: Fix parsing of some colors on Jellybean.
- SmoothStreaming: Ignore tfdt boxes.
- Misc bug fixes.
- Multi-track support.
- DASH: Limited support for multi-period manifests.
- HLS: Smoother format adaptation.
- HLS: Support for MP3 media segments.
- TTML: Support for most embedded TTML styling.
- WebVTT: Enhanced positioning support.
- Initial playback tests.
- Misc bug fixes.
- Implemented automatic format detection for regular container formats.
- Added UdpDataSource for connecting to multicast streams.
- Improved robustness for MP4 playbacks.
- Misc bug fixes.
- HLS: Fix premature playback failures that could occur in some cases.
- Support for extracting Matroska streams (implemented by WebmExtractor).
- Support for tx3g captions in MP4 streams.
- Support for H.265 in MPEG-TS streams on supported devices.
- HLS: Added support for MPEG audio (e.g. MP3) in TS media segments.
- HLS: Improved robustness against missing chunks and variants.
- MP4: Added support for embedded MPEG audio (e.g. MP3).
- TTML: Improved handling of whitespace.
- DASH: Support Mpd.Location element.
- Add option to TsExtractor to allow non-IDR keyframes.
- Added MulticastDataSource for connecting to multicast streams.
- (WorkInProgress) - First steps to supporting seeking in DASH DVR window.
- (WorkInProgress) - First steps to supporting styled + positioned subtitles.
- Misc bug fixes.
- HLS: Fix failure when playing HLS AAC streams.
- Misc bug fixes.
- DataSource improvements:
DefaultUriDataSource
now handles http://, https://, file://, asset:// and content:// URIs automatically. It also handles file:///android_asset/* URIs, and file paths like /path/to/media.mp4 where the scheme is omitted. - HLS: Fix for some ID3 events being dropped.
- HLS: Correctly handle 0x0 and floating point RESOLUTION tags.
- Mp3Extractor: robustness improvements.
- No notes provided.