Bot releases are visible (Hide)
This is the last planned release of the com.google.android.exoplayer2
artifacts. This project is now deprecated. All users should migrate to androidx.media3
(which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
This release corresponds to the AndroidX Media3 1.1.1 release.
multidex
dependency from all modules (#499).PlaybackStatsListener
where spurious PlaybackStats
are created after the playlist is cleared.Player.getState()
never transitioned to STATE_ENDED
when playing very short files (#538).This is the last planned release of the com.google.android.exoplayer2
artifacts. This project is now deprecated. All users should migrate to androidx.media3
(which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
This release corresponds to the AndroidX Media3 1.1.0 release.
COMMAND_GET_METADATA
COMMAND_SET_PLAYLIST_METADATA
COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS
COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS
void setDeviceVolume(int, int)
void increaseDeviceVolume(int)
void decreaseDeviceVolume(int)
void setDeviceMuted(boolean, int)
Builder
for DeviceInfo
and deprecate existing constructor.DeviceInfo.routingControllerId
to specify the routing controller ID for remote playbacks.Player.replaceMediaItem(s)
as a shortcut to adding and removing items at the same position (#8046).ExoPlayer.Builder.setDeviceVolumeControlEnabled
to have access to:
getDeviceVolume()
isDeviceMuted()
setDeviceVolume(int)
and setDeviceVolume(int, int)
increaseDeviceVolume(int)
and increaseDeviceVolume(int, int)
decreaseDeviceVolume(int)
and decreaseDeviceVolume(int, int)
FilteringMediaSource
that allows to filter available track types from a MediaSource
.br
, bl
, cid
, rtp
, and sid
, have been incorporated (#8699). API structure and API methods:
MediaSource.Factory.setCmcdConfigurationFactory(CmcdConfiguration.Factory cmcdConfigurationFactory)
to enable it.CmcdConfiguration.RequestConfig.isKeyAllowed(String key)
to filter out which keys are logged.CmcdConfiguration.RequestConfig.getCustomData()
to enable custom key logging.*.exolist.json
file (#439).ExoPlayer.setVideoEffects()
for using Effect
during video playback.SampleQueue
to store sourceId
as a long
rather than an int
. This changes the signatures of public methods SampleQueue.sourceId
and SampleQueue.peekSourceId
.LoadControl
methods shouldStartPlayback
and onTracksSelected
that allow associating these methods with the relevant MediaPeriod
.ServerSideAdInsertionMediaSource.setAdPlaybackStates(Map<Object, AdPlaybackState>)
by adding a timeline parameter that contains the periods with the UIDs used as keys in the map. This is required to avoid concurrency issues with multi-period live streams.EventDispatcher.withParameters(int windowIndex, @Nullable MediaPeriodId mediaPeriodId, long mediaTimeOffsetMs)
and BaseMediaSource.createEventDispatcher(..., long mediaTimeOffsetMs)
. The variant of the methods without the mediaTimeOffsetUs
can be called instead. Note that even for the deprecated variants, the offset is not anymore added to startTimeUs
and endTimeUs
of the MediaLoadData
objects that are dispatched by the dispatcher.ExoTrackSelection.blacklist
to excludeTrack
and isBlacklisted
to isTrackExcluded
.ExoPlayer.setMediaItem(s)
and addMediaItem(s)
when called on an empty playlist.Transformer.Builder.setMediaSourceFactory(MediaSource.Factory)
. Use ExoPlayerAssetLoader.Factory(MediaSource.Factory)
and Transformer.Builder.setAssetLoaderFactory(AssetLoader.Factory)
instead.Transformer.startTransformation(MediaItem, ParcelFileDescriptor)
.MediaCodecList
instead of using findDecoder/EncoderForFormat
utilities, to expand support.DefaultEncoderFactory
because it doesn't work on some devices.DefaultTrackSelector.Parameters.allowInvalidateSelectionsForRendererCapabilitiesChange
which is disabled by default. When enabled, the DefaultTrackSelector
will trigger a new track selection when the renderer capabilities changed.AudioProcessors
are active, e.g. for gapless trimming (#10847).Renderer.release()
and AudioSink.release()
for releasing the resources at the end of player's lifecycle.DefaultAudioSink
. Add a required parameter context
in the constructor of DefaultAudioSink
, with which the DefaultAudioSink
will register as the listener to the AudioCapabilitiesReceiver
and update its audioCapabilities
property when informed with a capabilities change.onAudioCapabilitiesChanged
in AudioSink.Listener
interface, and a new interface RendererCapabilities.Listener
which triggers onRendererCapabilitiesChanged
events.ChannelMixingAudioProcessor
for applying scaling/mixing to audio channels.DISCARD_REASON_AUDIO_BYPASS_POSSIBLE
to DecoderDiscardReasons
to discard audio decoder when bypass mode is possible after audio capabilities change.MediaCodecVideoRenderer
report a VideoSize
with a width and height of 0 when the renderer is disabled. Player.Listener.onVideoSizeChanged
is called accordingly when Player.getVideoSize()
changes. With this change, ExoPlayer's video size with MediaCodecVideoRenderer
has a width and height of 0 when Player.getCurrentTracks
does not support video, or the size of the supported video track is not yet determined.DefaultDrmSession
that aren't expected to be called from outside the DRM package:
void onMediaDrmEvent(int)
void provision()
void onProvisionCompleted()
onProvisionError(Exception, boolean)
shouldShowPlayButton
and handlePlayPauseButtonAction
to write custom UI elements with a play/pause button.MediaLoadData.startTimeMs
and MediaLoadData.endTimeMs
for multi period DASH streams.IndexOutOfBoundsException
(#10838).HlsMediaSource.Factory.setTimestampAdjusterInitializationTimeoutMs(long)
to set a timeout for the loading thread to wait for the TimestampAdjuster
to initialize. If the initialization doesn't complete before the timeout, a PlaybackException
is thrown to avoid the playback endless stalling. The timeout is set to zero by default (#323).DataSourceContractTest
.DefaultAudioSink
constructors, use DefaultAudioSink.Builder
instead.HlsMasterPlaylist
, use HlsMultivariantPlaylist
instead.Player.stop(boolean)
. Use Player.stop()
and Player.clearMediaItems()
(if reset
is true
) instead.SimpleCache
constructors, use a non-deprecated constructor that takes a DatabaseProvider
instead for better performance.DefaultBandwidthMeter
constructor, use DefaultBandwidthMeter.Builder
instead.DefaultDrmSessionManager
constructors, use DefaultDrmSessionManager.Builder
instead.HttpDataSource.InvalidResponseCodeException
constructors, use a non-deprecated constructor that accepts additional fields(cause
, responseBody
) to enhance error logging.DownloadHelper.forProgressive
, DownloadHelper.forHls
, DownloadHelper.forDash
, and DownloadHelper.forSmoothStreaming
, use DownloadHelper.forMediaItem
instead.DownloadService
constructor, use a non deprecated constructor that includes the option to provide a channelDescriptionResourceId
parameter.ASCII_NAME
, UTF8_NAME
, ISO88591_NAME
, UTF16_NAME
and UTF16LE_NAME
), use Kotlin Charsets from the kotlin.text
package, the java.nio.charset.StandardCharsets
or the com.google.common.base.Charsets
instead.WorkManagerScheduler
constructor, use a non deprecated constructor that includes the option to provide a Context
parameter instead.createVideoSampleFormat
, createAudioSampleFormat
, createContainerFormat
, and createSampleFormat
, which were used to instantiate the Format
class. Instead use Format.Builder
for creating instances of Format
.copyWithMaxInputSize
, copyWithSubsampleOffsetUs
, copyWithLabel
, copyWithManifestFormatInfo
, copyWithGaplessInfo
, copyWithFrameRate
, copyWithDrmInitData
, copyWithMetadata
, copyWithBitrate
and copyWithVideoSize
, use Format.buildUpon()
and setter methods instead.ExoPlayer.retry()
, use prepare()
instead.DefaultTrackSelector
constructor, use DefaultTrackSelector(Context)
instead.OfflineLicenseHelper
constructor, use OfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)
instead.DownloadManager
constructor, use the constructor that takes an Executor
instead.Cue
constructors, use Cue.Builder
instead.OfflineLicenseHelper
constructor, use OfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)
instead.AnalyticsListener
methods:
onDecoderEnabled
, use onAudioEnabled
and/or onVideoEnabled
instead.onDecoderInitialized
, use onAudioDecoderInitialized
and/or onVideoDecoderInitialized
instead.onDecoderInputFormatChanged
, use onAudioInputFormatChanged
and/or onVideoInputFormatChanged
instead.onDecoderDisabled
, use onAudioDisabled
and/or onVideoDisabled
instead.Player.Listener.onSeekProcessed
and AnalyticsListener.onSeekProcessed
, use onPositionDiscontinuity
with DISCONTINUITY_REASON_SEEK
instead.ExoPlayer.setHandleWakeLock(boolean)
, use setWakeMode(int)
instead.DefaultLoadControl.Builder.createDefaultLoadControl()
, use build()
instead.This release corresponds to the
AndroidX Media3 1.0.2 release.
Buffer.isLastSample()
that denotes if Buffer
contains flag C.BUFFER_FLAG_LAST_SAMPLE
.This release corresponds to the AndroidX Media3 1.0.1 release.
This release corresponds to the AndroidX Media3 1.0.0 release.
There are no changes since 2.18.4.
This release corresponds to the AndroidX Media3 1.0.0-rc02 release.
SegmentDownloader
and subclasses (#248).HEVCProfileMain10HDR10
instead of HEVCProfileMain10
.STATE_IDLE
when transitioning between media items (#245).LOADED
event wasn't received.MediaCodecSelector
's preferences, even if a decoder reports it may not be able to play the media performantly. For example with default selector, hardware decoder with only functional support will be preferred over software decoder that fully supports the format (#10604).ExoPlayer.Builder.setPlaybackLooper
that sets a pre-existing playback thread for a new ExoPlayer instance.BasePlayer.seekTo
to also indicate the command used for seeking.ConcatenatingMediaSource2
that allows combining multiple media items into a single window (#247).ParserException
instead of a NullPointerException
if the sample table (stbl) is missing a required sample description (stsd) when parsing trak atoms.AudioTrack
in direct playbacks (passthrough).TextRenderer
passing an invalid (negative) index to Subtitle.getEventTime
if a subtitle file contains no cues.MediaMetadata.mediaType
to denote the type of content or the type of folder described by the metadata.MediaMetadata.isBrowsable
as a replacement for MediaMetadata.folderType
. The folder type will be deprecated in the next release.StyledPlayerView.setControllerVisibilityListener(StyledPlayerControlView.VisibilityListener)
to ensure visibility changes are passed to the registered listener (#229).StyledPlayerView
when using a right-to-left (RTL) layout (#227).ImaServerSideAdInsertionMediaSource
on the application thread to avoid threading issues.focusSkipButtonWhenAvailable
to the ImaServerSideAdInsertionMediaSource.AdsLoader.Builder
to request focusing the skip button on TV devices and set it to true by default.focusSkipButton()
to the ImaServerSideAdInsertionMediaSource.AdsLoader
to programmatically request to focus the skip button.This release corresponds to the AndroidX media3 1.0.0-beta02 release.
ShuffleOrder
with ExoPlayer.setShuffleOrder
results in a call to Player.Listener#onTimelineChanged
with reason=Player.TIMELINE_CHANGE_REASON_PLAYLIST_CHANGED
(#9889).setDataSourceFactory
in DefaultMediaSourceFactory
, which was non-functional in some cases (#116).playWhenReady
changes in LeanbackAdapter
(10420).This release corresponds to the AndroidX media3 1.0.0-beta01 release.
MediaMetricsManager
. ExoPlayer will forward playback events and performance data to the platform, which helps to provide system performance and debugging information on the device. This data may also be collected by Google if sharing usage and diagnostics data is enabled by the user of the device. Apps can opt-out of contributing to platform diagnostics for ExoPlayer with ExoPlayer.Builder.setUsePlatformDiagnostics(false)
.MergingMediaSource
, for example when side-loading subtitles and changing the selected subtitle mid-playback (#10248).null
to MediaSource.Factory.setDrmSessionManagerProvider
and MediaSource.Factory.setLoadErrorHandlingPolicy
. Instances of DefaultDrmSessionManagerProvider
and DefaultLoadErrorHandlingPolicy
can be passed explicitly if required.MediaItem.RequestMetadata
to represent metadata needed to play media when the exact LocalConfiguration
is not known. Also remove MediaMetadata.mediaUrl
as this is now included in RequestMetadata
.Player.Command.COMMAND_SET_MEDIA_ITEM
to enable players to allow setting a single item.TrackSelectionOverrides
class into TrackSelectionParameters
, and promote TrackSelectionOverride
to a top level class.TracksInfo
to Tracks
and TracksInfo.TrackGroupInfo
to Tracks.Group
. Player.getCurrentTracksInfo
and Player.Listener.onTracksInfoChanged
have also been renamed to Player.getCurrentTracks
and Player.Listener.onTracksChanged
. This includes 'un-deprecating' the Player.Listener.onTracksChanged
method name, but with different parameter types.DefaultTrackSelector.buildUponParameters
and DefaultTrackSelector.Parameters.buildUpon
to return DefaultTrackSelector.Parameters.Builder
instead of the deprecated DefaultTrackSelector.ParametersBuilder
.DefaultTrackSelector.Parameters.constrainAudioChannelCountToDeviceCapabilities
which is enabled by default. When enabled, the DefaultTrackSelector
will prefer audio tracks whose channel count does not exceed the device output capabilities. On handheld devices, the DefaultTrackSelector
will prefer stereo/mono over multichannel audio formats, unless the multichannel format can be Spatialized (Android 12L+) or is a Dolby surround sound format. In addition, on devices that support audio spatialization, the DefaultTrackSelector
will monitor for changes in the Spatializer properties and trigger a new track selection upon these. Devices with a television
UI mode are excluded from these constraints and the format with the highest channel count will be preferred. To enable this feature, the DefaultTrackSelector
instance must be constructed with a Context
.DummySurface
to PlaceholderSurface
.MediaCodecVideoRenderer.getCodecMaxInputSize
.AudioAttributes.getAudioAttributesV21()
from android.media.AudioAttributes
to a new AudioAttributesV21
wrapper class, to prevent slow ART verification on API < 21.AudioTrack
with channel mask AudioFormat.CHANNEL_OUT_7POINT1POINT4
if the decoder outputs 12 channel PCM audio (#10322.Player.getCurrentCues()
to return CueGroup
instead of List<Cue>
.OutlineColour
style setting when BorderStyle == 3
(i.e. OutlineColour
sets the background of the cue) (#8435).RawCcExtractor
, which was only used to handle a Google-internal subtitle format.DiscardPadding
for Opus tracks.esds
boxes.OnClickListener
s set on StyledPlayerView
and PlayerView
, in the case that useController=false
(#9605). Also fix delivery of events to OnLongClickListener
for all view configurations.StyledPlayerView
and PlayerView
before ACTION_UP
as a click (#9861).PlayerView
accessibility issue where tapping might toggle playback rather than hiding the controls (#8627).TrackSelectionView
and TrackSelectionDialogBuilder
to work with the Player
interface rather than ExoPlayer
. This allows the views to be used with other Player
implementations, and removes the dependency from the UI module to the ExoPlayer module. This is a breaking change.PlayerView
track selector, and keep a suitable forced text track selected if "None" is selected (#9432).AudioChannelConfiguration
elements. This re-enables audio passthrough for DTS streams (#10159).null
to DashMediaSource.Factory.setCompositeSequenceableLoaderFactory
. Instances of DefaultCompositeSequenceableLoaderFactory
can be passed explicitly if required.null
to HlsMediaSource.Factory.setCompositeSequenceableLoaderFactory
, HlsMediaSource.Factory.setPlaylistParserFactory
, and HlsMediaSource.Factory.setPlaylistTrackerFactory
. Instances of DefaultCompositeSequenceableLoaderFactory
, DefaultHlsPlaylistParserFactory
, or a reference to DefaultHlsPlaylistTracker.FACTORY
can be passed explicitly if required.null
to SsMediaSource.Factory.setCompositeSequenceableLoaderFactory
. Instances of DefaultCompositeSequenceableLoaderFactory
can be passed explicitly if required.DummyDataSource
to PlaceholderDataSource
.3.21.0+
to avoid a CMake bug causing AndroidStudio's gradle sync to fail (#9933).Player.Listener.onTracksChanged(TrackGroupArray, TrackSelectionArray)
. Use Player.Listener.onTracksChanged(Tracks)
instead.Player.getCurrentTrackGroups
and Player.getCurrentTrackSelections
. Use Player.getCurrentTracks
instead. You can also continue to use ExoPlayer.getCurrentTrackGroups
and ExoPlayer.getCurrentTrackSelections
, although these methods remain deprecated.DownloadHelper
DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_VIEWPORT
and DEFAULT_TRACK_SELECTOR_PARAMETERS
constants. Use getDefaultTrackSelectorParameters(Context)
instead when possible, and DEFAULT_TRACK_SELECTOR_PARAMETERS_WITHOUT_CONTEXT
otherwise.DefaultTrackSelector(ExoTrackSelection.Factory)
. Use DefaultTrackSelector(Context, ExoTrackSelection.Factory)
instead.Transformer.Builder.setContext
. The Context
should be passed to the Transformer.Builder
constructor instead.This release corresponds to the AndroidX media3 1.0.0-alpha03 release.
SingleSampleMediaSource.Factory.setTrackId
and MediaItem.SubtitleConfiguration.Builder.setId
to prioritise the SubtitleConfiguration
field and fall back to the Factory
value if it's not set (#10016).MediaCodec
instance fails. This works around an issue that occurs on some devices when switching a surface from a secure codec to another codec (#8696).MediaCodecAdapter.getMetrics()
to allow users obtain metrics data from MediaCodec
(#9766).DecoderCounters#inputBufferCount
to queuedInputBufferCount
.SimpleExoPlayer.renderers
private. Renderers can be accessed via ExoPlayer.getRenderer
.AnalyticsListener.EventFlags
constant values to match values in Player.EventFlags
.AnalyticsCollector
into an interface and default implementation to allow it to be stripped by R8 if an app doesn't need it.TrackGroup
s in a TrackGroupArray
. TrackGroup
s can always be made distinguishable by setting an id
in the TrackGroup
constructor. This fixes a crash when resuming playback after backgrounding the app with an active track overrideAdaptiveTrackSelection
to allow a quality increase under sufficient network bandwidth even if playback is very close to theAudioCapabilities
APIs to require passing explicitly AudioCapabilities.DEFAULT_AUDIO_CAPABILITIES
instead of null
.AudioTrack
buffer size calculation by injecting an AudioTrackBufferSizeProvider
to DefaultAudioSink
(#8891).AudioTrack
creation if the requested buffer size was > 1MB (#9712).METADATA_BLOCK_PICTURE
) in Ogg Opus and Ogg Vorbis files.MediaItem.SubtitleConfiguration.id
field which is propagated to the Format.id
field of the subtitle track created from the configuration (#9673).Cea708Decoder
from reading more than the declared size of a service block.playbackLooper
from DrmSessionManager.(pre)acquireSession
. When a DrmSessionManager
is used by an app in a custom MediaSource
, the playbackLooper
needs to be passed to DrmSessionManager.setPlayer
instead.AdPlaybackState
to allow resetting an ad group so that it can be played again (#9615).HlsMediaSource.Factory.setAllowChunklessPreparation(false)
.Format.label
for audio only HLS streams (#9608).TransformationException
is now used to describe errors that occur during a transformation.TransformationRequest
for specifying the transformation options.Transformer.getProgress
when releasing the muxer throws.com.google.android.exoplayer:exoplayer
. To continue using transformer, add an additional dependency on com.google.android.exoplayer:exoplayer-transformer
.MediaSessionConnector
now clears the playlist on stop. Apps that want the playlist to be retained can call setClearMediaItemsOnStop(false)
on the connector.build_ffmpeg.sh
depend on LLVM's bin utils instead of GNU's (#9933).com.google.android.gms:play-services-cast-framework:20.1.0
. Earlier versions of play-services-cast-framework
are not compatible with apps targeting Android 12, and will crash with an IllegalArgumentException
when creating PendingIntent
s (#9528).Player.EventListener
. Use Player.Listener
instead.MediaSourceFactory#setDrmSessionManager
, MediaSourceFactory#setDrmHttpDataSourceFactory
, and MediaSourceFactory#setDrmUserAgent
. Use MediaSourceFactory#setDrmSessionManagerProvider
instead.MediaSourceFactory#setStreamKeys
. Use MediaItem.Builder#setStreamKeys
instead.MediaSourceFactory#createMediaSource(Uri)
. Use MediaSourceFactory#createMediaSource(MediaItem)
instead.setTag
from DashMediaSource
, HlsMediaSource
and SsMediaSource
. Use MediaItem.Builder#setTag
instead.DashMediaSource#setLivePresentationDelayMs(long, boolean)
. Use MediaItem.Builder#setLiveConfiguration
and MediaItem.LiveConfiguration.Builder#setTargetOffsetMs
to override the manifest, or DashMediaSource#setFallbackTargetLiveOffsetMs
to provide a fallback value.(Simple)ExoPlayer.setThrowsWhenUsingWrongThread
. Opting out of the thread enforcement is no longer possible.ActionFile
and ActionFileUpgradeUtil
. Use ExoPlayer 2.16.1 or before to use ActionFileUpgradeUtil
to merge legacy action files into DefaultDownloadIndex
.ProgressiveMediaSource#setExtractorsFactory
. Use ProgressiveMediaSource.Factory(DataSource.Factory, ExtractorsFactory)
constructor instead.ProgressiveMediaSource.Factory#setTag
and, ProgressiveMediaSource.Factory#setCustomCacheKey
. Use MediaItem.Builder#setTag
and MediaItem.Builder#setCustomCacheKey
instead.DefaultRenderersFactory(Context, @ExtensionRendererMode int)
and DefaultRenderersFactory(Context, @ExtensionRendererMode int, long)
constructors. Use the DefaultRenderersFactory(Context)
constructor, DefaultRenderersFactory#setExtensionRendererMode
, and DefaultRenderersFactory#setAllowedVideoJoiningTimeMs
instead.CronetDataSource
constructors. Use CronetDataSource.Factory
instead.IntDefs
to @Target(TYPE_USE)
only. This may break the compilation of usages in Kotlin, which can be fixed by moving the annotation to annotate the type (Int
).
@AacAudioObjectType
@Ac3Util.SyncFrameInfo.StreamType
@AdLoadException.Type
@AdtsExtractor.Flags
@AmrExtractor.Flags
@AspectRatioFrameLayout.ResizeMode
@AudioFocusManager.PlayerCommand
@AudioSink.SinkFormatSupport
@BinarySearchSeeker.TimestampSearchResult.Type
@BufferReplacementMode
@C.BufferFlags
@C.ColorRange
@C.ColorSpace
@C.ColorTransfer
@C.CryptoMode
@C.Encoding
@C.PcmEncoding
@C.Projection
@C.SelectionReason
@C.StereoMode
@C.VideoOutputMode
@CacheDataSource.Flags
@CaptionStyleCompat.EdgeType
@DataSpec.Flags
@DataSpec.HttpMethods
@DecoderDiscardReasons
@DecoderReuseResult
@DefaultAudioSink.OutputMode
@DefaultDrmSessionManager.Mode
@DefaultTrackSelector.SelectionEligibility
@DefaultTsPayloadReaderFactory.Flags
@EGLSurfaceTexture.SecureMode
@EbmlProcessor.ElementType
@ExoMediaDrm.KeyRequest.RequestType
@ExtensionRendererMode
@Extractor.ReadResult
@FileTypes.Type
@FlacExtractor.Flags
(in com.google.android.exoplayer2.ext.flac
package)@FlacExtractor.Flags
(in com.google.android.exoplayer2.extractor.flac
package)@FragmentedMp4Extractor.Flags
@HlsMediaPlaylist.PlaylistType
@HttpDataSourceException.Type
@IllegalClippingException.Reason
@IllegalMergeException.Reason
@LoadErrorHandlingPolicy.FallbackType
@MatroskaExtractor.Flags
@Mp3Extractor.Flags
@Mp4Extractor.Flags
@NotificationUtil.Importance
@PlaybackException.FieldNumber
@PlayerNotificationManager.Priority
@PlayerNotificationManager.Visibility
@PlayerView.ShowBuffering
@Renderer.State
@RendererCapabilities.AdaptiveSupport
@RendererCapabilities.Capabilities
@RendererCapabilities.DecoderSupport
@RendererCapabilities.FormatSupport
@RendererCapabilities.HardwareAccelerationSupport
@RendererCapabilities.TunnelingSupport
@SampleStream.ReadDataResult
@SampleStream.ReadFlags
@StyledPlayerView.ShowBuffering
@SubtitleView.ViewType
@TextAnnotation.Position
@TextEmphasisSpan.MarkFill
@TextEmphasisSpan.MarkShape
@Track.Transformation
@TrackOutput.SampleDataPart
@Transformer.ProgressState
@TsExtractor.Mode
@TsPayloadReader.Flags
@WebvttCssStyle.FontSizeUnit
DefaultRenderersFactory.getCodecAdapterFactory()
so that subclasses of DefaultRenderersFactory
that override buildVideoRenderers()
or buildAudioRenderers()
can access the codec adapter factory and pass it to MediaCodecRenderer
instances they create.name
and genre
to MediaMetadata.station
and MediaMetadata.genre
respectively so thatPlayer.Listener.onMediaMetadataChanged()
(#9677).DefaultHttpDataSource#getResponseHeaders
.Representation
(#9579).Format.label
for audio only HLS streams (#9608).SimpleExoPlayer
. All functionality has been moved to ExoPlayer
instead. ExoPlayer.Builder
can be used instead of SimpleExoPlayer.Builder
.Player
interface, for example, Player.getCurrentTracksInfo
and Player.setTrackSelectionParameters
. These methods can be used instead of directly accessing the track selector.DefaultMediaCodecRendererFactory
and DefaultRenderersFactory
to force enable or force disable asynchronous queueing (6348).jcenter()
.mediaMetadata
being reset when media is repeated (#9458).ExoPlayer
MediaMetadata
update priority, such that values input through the MediaItem.MediaMetadata
are used above media derived values.com.google.android.exoplayer2.device.DeviceInfo
to com.google.android.exoplayer2.DeviceInfo
.com.google.android.exoplayer2.drm.DecryptionException
to com.google.android.exoplayer2.decoder.CryptoException
.com.google.android.exoplayer2.upstream.cache.CachedRegionTracker
to com.google.android.exoplayer2.upstream.CachedRegionTracker
.Player.addListener(EventListener)
and Player.removeListener(EventListener)
out of Player
into subclasses.DownloadService
started and in the foreground whilst waiting for requirements to be met on Android 12. This is necessary due to new foreground service launch restrictions. DownloadService.getScheduler
will not be called on Android 12 devices.ExoPlayer.setVideoChangeFrameRateStrategy
to allow disabling of calls from the player to Surface.setFrameRate
. This is useful for applications wanting to call Surface.setFrameRate
directly from application code with Android 12's Surface.CHANGE_FRAME_RATE_ALWAYS
.androidx.work:work-runtime:2.7.0
. Earlier versions of work-runtime
IllegalArgumentException
when creating PendingIntent
s (#9181).MediaCodecVideoRenderer
that resulted in re-using a released Surface
when playing without an app-provided Surface
(#9476).IllegalStateException
) when calling DefaultDrmSession#release()
on a fully released sessionArrayIndexOutOfBoundsException
when parsing invalid colr
boxes produced by some device cameras (#9332).clli
and mdcv
boxes.DownloadService
behavior when DownloadService.getScheduler
returns null
, or returns a Scheduler
that does not support the requirements for downloads to continue. In both cases, DownloadService
will now remain started and in the foreground whilst waiting for requirements to be met.DownloadService
behavior when running on Android 12 and above. See the "Android 12 compatibility" section above.Format.sampleMimeType
, width
and height
for image AdaptationSet
elements (#9500).io.antmedia:rtmp_client
, which does not rely on jcenter()
(#9591).MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChanged
to onCurrentMediaItemIndexChanged
.Renderer.VIDEO_SCALING_MODE_*
constants. Use identically named constants in C
instead.C.MSG_*
constants. Use identically named constants in Renderer
instead, except for C.MSG_SET_SURFACE
, which is replaced with Renderer.MSG_SET_VIDEO_OUTPUT
.DeviceListener
. Use Player.Listener
instead.CacheDataSourceFactory
. Use CacheDataSource.Factory
instead.CacheDataSinkFactory
. Use CacheDataSink.Factory
instead.FileDataSourceFactory
. Use FileDataSource.Factory
instead.SimpleExoPlayer.addMetadataOutput
and removeMetadataOutput
. Use Player.addListener
and Player.Listener
instead.SimpleExoPlayer.addAudioListener
, removeAudioListener
and AudioListener
. Use Player.addListener
and Player.Listener
instead.SimpleExoPlayer.addVideoListener
, removeVideoListener
and VideoListener
. Use Player.addListener
and Player.Listener
instead.DefaultHttpDataSourceFactory
. Use DefaultHttpDataSource.Factory
instead.SingleSampleMediaSource.createMediaSource(Uri, Format, long)
. Use SingleSampleMediaSource.createMediaSource(MediaItem.Subtitle, long)
instead.HttpDataSource.Factory.getDefaultRequestProperties
. Use HttpDataSource.Factory.setDefaultRequestProperties
instead.GvrAudioProcessor
and the GVR extension, which has been deprecated since 2.11.0.DownloadService.onDownloadChanged
and DownloadService.onDownloadRemoved
. Instead, useDownloadManager.addListener
to register a listener directly to the DownloadManager
returned through DownloadService.getDownloadManager
.Player.getCurrentStaticMetadata
, Player.Listener.onStaticMetadataChanged
andPlayer.EVENT_STATIC_METADATA_CHANGED
. Use Player.getMediaMetadata
, Player.Listener.onMediaMetadataChanged
andPlayer.EVENT_MEDIA_METADATA_CHANGED
for convenient access to structured metadata, or access the raw static metadata directly from the TrackSelection#getFormat()
.ControlDispatcher
and DefaultControlDispatcher
. Operations can be customized by using a ForwardingPlayer
, or when configuring the player (for example by using ExoPlayer.Builder.setSeekBackIncrementMs
).StyledPlayerControlView
when using ForwardingPlayer
.FlagSet#equals
on API levels below 24.NullPointerException
being thrown from CacheDataSource
when reading a fully cached resource with DataSpec.position
equal to the resource length.MimeTypes.AUDIO_DTS_UHD
to MimeTypes.AUDIO_DTS_X
and add required profile to its value (#9429).DefaultDrmSessionManager
to correctly eagerly release preacquired DRM sessions when there's a shortage of DRM resources on the device.SecurityException
to be thrown from Requirements.isInternetConnectivityValidated
on devices running Android 11 (#9002).CastPlayer.setPlaybackParameters(PlaybackParameters)
to support setting the playback speed (#6784).MediaCodecAdapter.needsReconfiguration
method.getSeekBackIncrement
, seekBack
, getSeekForwardIncrement
, seekForward
, getMaxSeekToPreviousPosition
, seekToPrevious
and seekToNext
methods to Player
.Player
methods:
hasPrevious
to hasPreviousWindow
.previous
to seekToPreviousWindow
.hasNext
to hasNextWindow
.next
to seekToNextWindow
.Player
commands:
COMMAND_SEEK_IN_CURRENT_MEDIA_ITEM
to COMMAND_SEEK_IN_CURRENT_WINDOW
.COMMAND_SEEK_TO_NEXT_MEDIA_ITEM
to COMMAND_SEEK_TO_NEXT_WINDOW
.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEM
to COMMAND_SEEK_TO_PREVIOUS_WINDOW
.COMMAND_SEEK_TO_MEDIA_ITEM
to COMMAND_SEEK_TO_WINDOW
.COMMAND_GET_MEDIA_ITEMS
to COMMAND_GET_TIMELINE
.Player.EventFlags
IntDef to Player.Event
.Player
depend on the new PlaybackException
class instead of ExoPlaybackException
:
Player.getPlayerError
now returns a PlaybackException
.Player.Listener.onPlayerError
now receives a PlaybackException
.Player.Listener.onPlayerErrorChanged
, which is equivalent to onPlayerError
except that it is also called when the player error becomes null
.Player
implementations like ExoPlayer
may use PlaybackException
subclasses (like ExoPlaybackException
), so users can downcast the PlaybackException
instance to obtain implementation-specific fields (like ExoPlaybackException.rendererIndex
).PlaybackException
introduces an errorCode
which identifies the cause of the failure in order to simplify error handling (#1611).DefaultMediaDescriptionAdapter
for the PlayerNotificationManager
, that makes use of the Player
MediaMetadata
to populate the notification fields.@FallbackType
to LoadErrorHandlingPolicy
to support customization of the exclusion duration for locations and tracks.LoadErrorHandlingPolicy
to support configuring the behavior of track and location fallback. Location fallback is currently only supported for DASH manifests with multiple base URLs.AudioTrack.isDirectPlaybackSupported
to TVs, to avoid listing audio offload encodings as supported for passthrough mode on mobile devices (#9239).rubyPosition
value from a containing <span ruby="container">
element.font-size
property (#8964).setUseRewindAction
and setUseFastForwardAction
to PlayerNotificationManager
, and setUseFastForwardActionInCompactView
and setUseRewindActionInCompactView
to show the actions in compact view mode.rewind_increment
and fastforward_increment
attributes from PlayerControlView
and StyledPlayerControlView
. These increments can be customized by configuring the Player
(see setSeekBackIncrementMs
and setSeekForwardIncrementMs
in SimpleExoPlayer.Builder
), or by using a ForwardingPlayer
that overrides getSeekBackIncrement
, seekBack
, getSeekForwardIncrement
and seekForward
. The rewind and fast forward buttons can be disabled by using a ForwardingPlayer
that removes COMMAND_SEEK_BACK
and COMMAND_SEEK_FORWARD
from the available commands.DefaultControlDispatcher
getRewindIncrementMs
and getFastForwardIncrementMs
to take the player as parameter.StreamIndex
element Name
attribute value as Format
label (#9252).CronetDataSource.Factory.setRequestPriority
to allow setting the priority of requests made by CronetDataSource
instances.CastPlayer
specific playlist manipulation methods. Use setMediaItems
, addMediaItems
, removeMediaItem
and moveMediaItem
instead.Format.create
methods. Use Format.Builder
instead.MediaSource.getTag
. Use MediaSource.getMediaItem
and MediaItem.PlaybackProperties.tag
instead.PlaybackPreparer
. UI components that previously had setPlaybackPreparer
methods will now call Player.prepare
by default. If this behavior is sufficient, use of PlaybackPreparer
can be removed from application code without replacement. For custom preparation logic, use a ForwardingPlayer
that implements custom preparation logic in prepare
.Player.Listener.onTimelineChanged(Timeline, Object, int)
. Use Player.Listener.onTimelineChanged(Timeline, int)
instead. The manifest can be accessed using Player.getCurrentManifest
.Player.getCurrentTag
. Use Player.getCurrentMediaItem
and MediaItem.PlaybackProperties.tag
instead.Player.getPlaybackError
. Use Player.getPlayerError
instead.PlayerNotificationManager
constructors and createWith
methods. Use PlayerNotificationManager.Builder
instead.PlayerNotificationManager.setNotificationListener
. Use PlayerNotificationManager.Builder.setNotificationListener
instead.PlayerNotificationManager
setUseNavigationActions
and setUseNavigationActionsInCompactView
. Use setUseNextAction
, setUsePreviousAction
, setUseNextActionInCompactView
and setUsePreviousActionInCompactView
instead.setRewindIncrementMs
and setFastForwardIncrementMs
from UI components. These increments can be customized by configuring the Player
(see setSeekBackIncrementMs
and setSeekForwardIncrementMs
in SimpleExoPlayer.Builder
), or by using a ForwardingPlayer
that overrides getSeekBackIncrement
, seekBack
, getSeekForwardIncrement
and seekForward
. The rewind and fast forward buttons can be disabled by using a ForwardingPlayer
that removes COMMAND_SEEK_BACK
and COMMAND_SEEK_FORWARD
from the available commands.Timeline.getWindow(int, Window, boolean)
. Use Timeline.getWindow(int, Window)
instead, which will always set tags.SimpleExoPlayer
as @Deprecated
. These methods are all overrides and are already deprecated on Player
and the respective ExoPlayer
component classes (since 2.14.0).IncorrectContextUseViolation
strict mode warning on Android 11 (#8246).AudioTrack.isDirectPlaybackSupported
to check for encoded audio passthrough capability from API 29 onwards, instead of using the HDMI audio plug intent (#6500).trun
atom could be associated with the wrong track in an FMP4 stream (#9056). The fix removes a previous workaround to handle content in which the track_ID
is set incorrectly (#4083). Such content is malformed and should be re-encoded.STATE_ENDED
when the event ends (#9067).EXT-X-MAP
tag in a media playlist, would not be loaded when encountered during playback (#9004).EXT-X-START
tag when placed in a playlist (#9037).DefaultDrmSession(Manager)
.DefaultDrmSessionManager.release()
incorrectly releasing too many keep-alive DefaultDrmSession
references, resulting in DefaultDrmSession.release()
throwing an IllegalStateException
(#9193).PendingIntent.FLAG_IMMUTABLE
flag when creating a broadcast intent in PlayerNotificationManager
. This is required to avoid an error on Android 12.StyledPlayerView
and StyledPlayerControlView
popup menus on API levels prior to 26 (#9061).StyledPlayerView
and StyledPlayerControlView
popup menu items not expanding to occupy the full width of the popup (#9086).AttributeSet
from SubtitleView
constructor into CanvasSubtitleOutput
. Just passing the Context
is enough, and ensures programmatic changes to the SubtitleView
will propagate down.exoplayerRoot
when depending on ExoPlayer locallyMediaItem.Builder
javadoc to discourage calling setters that will be (currently) ignored if another setter is not also called.CodecException: Error 0xffffffff
to be thrown from MediaCodec.native_setSurface
in use cases that involve both swapping the output Surface
and a mixture of secure and non-secure content being played (#8776).PRECISE
attribute in EXT-X-START
to select the default start position.MediaCodec
instances initialized when disabling (but not resetting) MediaCodecRenderer
. This helps re-use secure decoders in more contexts, which avoids the 'black flash' caused by detaching a Surface
from a secure decoder on some devices (#8842). It will also result in DRM license refresh network requests while the player is stopped if Player#setForegroundMode
is true.Cue.text
even when SubtitleView#setApplyEmbeddedStyles()
is false
.NullPointerException
in StyledPlayerView
that could occur after calling StyledPlayerView.setPlayer(null)
(#8985).Player
components to ExoPlayer
. For example Player.VideoComponent
is now ExoPlayer.VideoComponent
.Player
's audio, video, text and metadata components have been added directly to Player
.Player.getAvailableCommands
, Player.isCommandAvailable
and Listener.onAvailableCommandsChanged
to query which commands that can be executed on the player.Player.Listener
interface to receive all player events. Component listeners and EventListener
have been deprecated.Player.getMediaMetadata
, which returns a combined and structured MediaMetadata
object. Changes to metadata are reported to Listener.onMediaMetadataChanged
.Player.setPlaybackParameters
no longer accepts null, use PlaybackParameters.DEFAULT
instead.Listener.onPositionDiscontinuity
. Add DISCONTINUITY_REASON_SKIP
and DISCONTINUITY_REASON_REMOVE
as discontinuity reasons, and rename DISCONTINUITY_REASON_PERIOD_TRANSITION
to DISCONTINUITY_REASON_AUTO_TRANSITION
. Remove DISCONTINUITY_REASON_AD_INSERTION
, for which DISCONTINUITY_REASON_AUTO_TRANSITION
is used instead (#6163, #4768).ExoPlayer.Builder
. Use SimpleExoPlayer.Builder
instead.Player.getRendererCount
and Player.getRendererType
to ExoPlayer
.MediaItem.Builder.setMediaId(String)
.MediaCodecRenderer.configureCodec()
and add MediaCodecRenderer.getMediaCodecConfiguration()
. The new method is called just before the MediaCodec
is created and returns the parameters needed to create and configure the MediaCodec
instance. Applications can override MediaCodecRenderer.onCodecInitialized()
to be notified after a MediaCodec
is initialized, or they can inject a custom MediaCodecAdapter.Factory
if they want to control how the MediaCodec
is configured.AdaptiveTrackSelection.AdaptationCheckpoint
to public
visibility to allow Kotlin subclasses of AdaptiveTrackSelection.Factory
(#8830).onMediaItemTransition
by mistake.AdsLoader.AdViewProvider
and AdsLoader.OverlayInfo
have been renamed com.google.android.exoplayer2.ui.AdViewProvider
and com.google.android.exoplayer2.ui.AdOverlayInfo
respectively.CaptionStyleCompat
has been moved to the com.google.android.exoplayer2.ui
package.DebugTextViewHelper
has been moved from the ui
package to the util
package.CacheWriter
to correctly handle cases where the request DataSpec
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 the allowShortContent
parameter has been removed (#7326).CacheWriter
to correctly handle DataSource.close
failures, for which it cannot be assumed that data was successfully written to the cache.PlayerNotificationManager.Builder
, with the ability to specify which group the notification should belong to.setUseSensorRotation
from PlayerView
and StyledPlayerView
. Instead, cast the view returned by getVideoSurfaceView
to SphericalGLSurfaceView
, and then call setUseSensorRotation
on the SphericalGLSurfaceView
directly.onAudioCodecError
and onVideoCodecError
to AnalyticsListener
.Player.getVideoSize()
to retrieve the current size of the video stream. Add Listener.onVideoSizeChanged(VideoSize)
and deprecate Listener.onVideoSizeChanged(int, int, int, float)
.AnalyticsListener.onAudioSinkError
(#6384).SubtitleView.VIEW_TYPE_WEB
.Style:
lines (#8435).tts:textAlign
is correctly propagated from <p>
nodes to child nodes.ebutts:multiRowAlign
attributes.MediaParserExtractorAdapter.FACTORY
when creating a ProgressiveMediaSource.Factory
.MediaParserHlsMediaChunkExtractor.FACTORY
when creating a HlsMediaSource.Factory
.DefaultDashChunkSource
that uses MediaParserChunkExtractor.FACTORY
when creating a DashMediaSource.Factory
.onMediaItemTransition
event for all reasons except MEDIA_ITEM_TRANSITION_REASON_REPEAT
.exoplayer-core
, relying only exoplayer-common
instead. To achieve this, TimelineQueueEditor
uses a new MediaDescriptionConverter
interface, and no longer relies on ConcatenatingMediaSource
.ExoPlayerFactory
. Use SimpleExoPlayer.Builder
instead.Player.DefaultEventListener
. Use Player.Listener
instead.ExtractorMediaSource
. Use ProgressiveMediaSource
instead.DefaultMediaSourceEventListener
. Use MediaSourceEventListener
instead.DashManifest
constructor. Use the remaining constructor with programInformation
and serviceDescription
set to null
instead.CryptoInfo.getFrameworkCryptoInfoV16
. Use CryptoInfo.getFrameworkCryptoInfo
instead.NotificationUtil.createNotificationChannel(Context, String, int, int)
. Use createNotificationChannel(Context, String, int, int, int)
instead.PlayerNotificationManager.setNotificationListener
. Use PlayerNotificationManager.Builder.setNotificationListener
instead.PlayerNotificationManager.NotificationListener
onNotificationStarted(int, Notification)
and onNotificationCancelled(int)
. Use onNotificationPosted(int, Notification, boolean)
and onNotificationCancelled(int, boolean)
instead.DownloadNotificationUtil
. Use DownloadNotificationHelper
instead.extension-jobdispatcher
module. Use the extension-workmanager
module instead.forced_subtitle
role from DASH manifests (#8781).EXT-X-START
when setting the live target offset (#8764).EXT-X-MAP
tags (#8783).EXT-X-DISCONTINUITY
tags in different media playlists occur at different positions in time (#8372).EXT-X-PROGRAM-DATE-TIME
tags.GContainer
and GContainerItem
XMP namespace prefixes in JPEG motion photo parsing.JpegExtractor
.Style:
lines (#8435).ClippingMediaPeriod
and prevents content subtitles from continuing to be displayed over mid-roll ads (#5317, #8456).textEmphasis
attributes, used for Japanese boutens.shear
attributes.onPositionDiscontinuity
event so that it is not triggered with reason DISCONTINUITY_REASON_PERIOD_TRANSITION
after a seek to another media item and so that it is not triggered after a timeline change.