- Core Library:
- Add
MediaCodecAdapter.needsReconfiguration
method. - Add
getSeekBackIncrement
,seekBack
,getSeekForwardIncrement
,seekForward
,getMaxSeekToPreviousPosition
,seekToPrevious
andseekToNext
methods toPlayer
. - Rename
Player
methods:hasPrevious
tohasPreviousWindow
.previous
toseekToPreviousWindow
.hasNext
tohasNextWindow
.next
toseekToNextWindow
.
- Rename
Player
commands:COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM
toCOMMAND_SEEK_IN_CURRENT_WINDOW
.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM
toCOMMAND_SEEK_TO_NEXT_WINDOW
.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM
toCOMMAND_SEEK_TO_PREVIOUS_WINDOW
.COMMAND_SEEK_TO_MEDIA_ITEM
toCOMMAND_SEEK_TO_WINDOW
.COMMAND_GET_MEDIA_ITEMS
toCOMMAND_GET_TIMELINE
.
- Rename
Player.EventFlags
IntDef toPlayer.Event
. - Make
Player
depend on the newPlaybackException
class instead ofExoPlaybackException
:Player.getPlayerError
now returns aPlaybackException
.Player.Listener.onPlayerError
now receives aPlaybackException
.- Add a new listener method
Player.Listener.onPlayerErrorChanged
, which is equivalent toonPlayerError
except that it is also called when the player error becomesnull
. Player
implementations likeExoPlayer
may usePlaybackException
subclasses (likeExoPlaybackException
), so users can downcast thePlaybackException
instance to obtain implementation-specific fields (likeExoPlaybackException.rendererIndex
).
PlaybackException
introduces anerrorCode
which identifies the cause of the failure in order to simplify error handling (#1611).- Add a
DefaultMediaDescriptionAdapter
for thePlayerNotificationManager
, that makes use of thePlayer
MediaMetadata
to populate the notification fields. - Add
@FallbackType
toLoadErrorHandlingPolicy
to support customization of the exclusion duration for locations and tracks. - Change interface of
LoadErrorHandlingPolicy
to support configuring the behavior of track and location fallback. Location fallback is currently only supported for DASH manifests with multiple base URLs. - Restrict use of
AudioTrack.isDirectPlaybackSupported
to TVs, to avoid listing audio offload encodings as supported for passthrough mode on mobile devices (#9239).
- Add
- Extractors:
- Add support for DTS-UHD in MP4 (#9163).
- Text:
- TTML: Inherit the
rubyPosition
value from a containing<span ruby="container">
element. - WebVTT: Add support for CSS
font-size
property (#8964).
- TTML: Inherit the
- Ad playback:
- Support changing ad break positions in the player logic (#5067).
- Support resuming content with an offset after an ad group.
- UI:
- Add
setUseRewindAction
andsetUseFastForwardAction
toPlayerNotificationManager
, andsetUseFastForwardActionInCompactView
andsetUseRewindActionInCompactView
to show the actions in compact view mode. - Remove
rewind_increment
andfastforward_increment
attributes fromPlayerControlView
andStyledPlayerControlView
. These increments can be customized by configuring thePlayer
(seesetSeekBackIncrementMs
andsetSeekForwardIncrementMs
inSimpleExoPlayer.Builder
), or by using aForwardingPlayer
that overridesgetSeekBackIncrement
,seekBack
,getSeekForwardIncrement
andseekForward
. The rewind and fast forward buttons can be disabled by using aForwardingPlayer
that removesCOMMAND_SEEK_BACK
andCOMMAND_SEEK_FORWARD
from the available commands. - Update
DefaultControlDispatcher
getRewindIncrementMs
andgetFastForwardIncrementMs
to take the player as parameter.
- Add
- DASH:
- HLS:
- RTSP:
- SmoothStreaming:
- Propagate
StreamIndex
elementName
attribute value asFormat
label (#9252).
- Propagate
- Cronet extension:
- Add
CronetDataSource.Factory.setRequestPriority
to allow setting the priority of requests made byCronetDataSource
instances.
- Add
- OkHttp extension:
- Switch to OkHttp 4.9.1. This increases the extension's minimum SDK version requirement from 16 to 21.
- Remove deprecated symbols:
- Remove
CastPlayer
specific playlist manipulation methods. UsesetMediaItems
,addMediaItems
,removeMediaItem
andmoveMediaItem
instead. - Remove
Format.create
methods. UseFormat.Builder
instead. - Remove
MediaSource.getTag
. UseMediaSource.getMediaItem
andMediaItem.PlaybackProperties.tag
instead. - Remove
PlaybackPreparer
. UI components that previously hadsetPlaybackPreparer
methods will now callPlayer.prepare
by default. If this behavior is sufficient, use ofPlaybackPreparer
can be removed from application code without replacement. For custom preparation logic, use aForwardingPlayer
that implements custom preparation logic inprepare
. - Remove
Player.Listener.onTimelineChanged(Timeline, Object, int)
. UsePlayer.Listener.onTimelineChanged(Timeline, int)
instead. The manifest can be accessed usingPlayer.getCurrentManifest
. - Remove
Player.getCurrentTag
. UsePlayer.getCurrentMediaItem
andMediaItem.PlaybackProperties.tag
instead. - Remove
Player.getPlaybackError
. UsePlayer.getPlayerError
instead. - Remove
PlayerNotificationManager
constructors andcreateWith
methods. UsePlayerNotificationManager.Builder
instead. - Remove
PlayerNotificationManager.setNotificationListener
. UsePlayerNotificationManager.Builder.setNotificationListener
instead. - Remove
PlayerNotificationManager
setUseNavigationActions
andsetUseNavigationActionsInCompactView
. UsesetUseNextAction
,setUsePreviousAction
,setUseNextActionInCompactView
andsetUsePreviousActionInCompactView
instead. - Remove
setRewindIncrementMs
andsetFastForwardIncrementMs
from UI components. These increments can be customized by configuring thePlayer
(seesetSeekBackIncrementMs
andsetSeekForwardIncrementMs
inSimpleExoPlayer.Builder
), or by using aForwardingPlayer
that overridesgetSeekBackIncrement
,seekBack
,getSeekForwardIncrement
andseekForward
. The rewind and fast forward buttons can be disabled by using aForwardingPlayer
that removesCOMMAND_SEEK_BACK
andCOMMAND_SEEK_FORWARD
from the available commands. - Remove
Timeline.getWindow(int, Window, boolean)
. UseTimeline.getWindow(int, Window)
instead, which will always set tags.
- Remove