RELEASENOTES.md
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 release corresponds to the AndroidX Media3 1.1.0 release.
COMMAND_GET_METADATACOMMAND_SET_PLAYLIST_METADATACOMMAND_SET_DEVICE_VOLUME_WITH_FLAGSCOMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGSvoid 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.MediaItem.PlaybackProperties, use
MediaItem.LocalConfiguration instead. Deprecated field
MediaItem.playbackProperties is now of type
MediaItem.LocalConfiguration.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.
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.This release corresponds to the AndroidX Media3 1.0.0-rc01 release.
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-beta03 release.
ExoPlayer.isTunnelingEnabled to check if tunneling is enabled for
the currently selected tracks
(#2518).WrappingMediaSource to simplify wrapping a single MediaSource
(#7279).PlaybackStatsListener
(#180).onMediaItemTransition callback when calling seekToNext
or seekToPrevious in a single-item playlist
(#10667).Player.getSurfaceSize that returns the size of the surface on
which the video is rendered.IllegalStateException
(#10758).compileSdkVersion to avoid compilation errors
(#10684).SingleThreadExecutor for releasing AudioTrack instances to avoid
OutOfMemory errors when releasing multiple players at the same time
(#10057).AudioOffloadListener.onExperimentalOffloadedPlayback for the
AudioTrack offload state.
(#134).AudioTrackBufferSizeProvider a public interface.ExoPlayer.setPreferredAudioDevice to set the preferred audio
output device (#135).MetadataRenderer can now be configured to render metadata as soon as
they are available. Create an instance with
MetadataRenderer(MetadataOutput, Looper, MetadataDecoderFactory, boolean) to specify whether the renderer will output metadata early or
in sync with the player position.setMediaDrmSession failed: session not opened error when switching
between DRM schemes in a playlist (e.g. Widevine to ClearKey).EventStream.presentationTimeOffset from manifests
(#10460).TrackSelectionDialogBuilder
(#10429).getDeviceInfo() to be able to identify CastPlayer when
controlling playback with a MediaController
(#142).Transformer.Builder.setOutputMimeType(String). This feature has
been removed. The MIME type will always be MP4 when the default muxer is
used.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.OnClickListeners 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).This release corresponds to the AndroidX media3 1.0.0-alpha02 release.
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.TrackGroups in a TrackGroupArray. TrackGroups
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 override
(#9718).AdaptiveTrackSelection to allow a quality increase
under sufficient network bandwidth even if playback is very close to the
live edge (#9784).AudioCapabilities 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 PendingIntents
(#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.FontSizeUnitDefaultRenderersFactory.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 that
they reach the app via Player.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
are not compatible with apps targeting Android 12, and will crash with
an IllegalArgumentException when creating PendingIntents
(#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 session
(#9392).ArrayIndexOutOfBoundsException 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, use
DownloadManager.addListener to register a listener directly to the
DownloadManager returned through DownloadService.getDownloadManager.Player.getCurrentStaticMetadata,
Player.Listener.onStaticMetadataChanged and
Player.EVENT_STATIC_METADATA_CHANGED. Use Player.getMediaMetadata,
Player.Listener.onMediaMetadataChanged and
Player.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).FRAME-RATE value from the master playlist to renditions.
(#8960).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 when creating broadcast intents in
PlayerNotificationManager. This is required by a
behaviour change
in 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 locally
(#8927).MediaItem.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).SegmentTemplate.getSegmentCount()
to return incorrect values
(#8804).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.DefaultControlDispatcher, PlayerControlView,
StyledPlayerControlView, PlayerNotificationManager and
TimelineQueueNavigator.SimpleExoPlayer reporting audio session ID as 0 in some cases
(#8585).Style: lines
(#8435).ImaAdsLoader.focusSkipButton to allow apps to request that the
skip button should receive UI focus, if shown
(#8565).SimpleExoPlayer by default. Opt-out is
still possible until the next major release using
setThrowsWhenUsingWrongThread(false)
(#4463).Player.getCurrentStaticMetadata and
EventListener.onStaticMetadataChanged to expose static metadata
belonging to the currently playing stream
(#7266).PlayerMessage.setLooper and deprecate PlayerMessage.setHandler.MergingMediaSource to clip the durations of all sources
to have the same length
(#8422).Player.setVideoDecoderOutputBufferRenderer from Player API. Use
setVideoSurfaceView and clearVideoSurfaceView instead.SingleSampleMediaSource.treatLoadErrorsAsEndOfStream to true
so that errors loading external subtitle files do not cause playback to
fail (#8430). A
warning will be logged by SingleSampleMediaPeriod whenever a load
error is treated as though the end of the stream has been reached.AnalyticsListener callbacks could arrive in the wrong
order (#8048).transformer module for converting media streams. The
initially available transformations are changing the container format,
removing tracks, and slow motion flattening.LiveConfiguration to MediaItem to define live offset and
playback speed adjustment parameters. The same parameters can be set on
DefaultMediaSourceFactory to apply for all MediaItems.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.targetLiveOffsetUs parameter to LoadControl.shouldStartPlayback.stsd information and
stsz fixed sample size in MP4 extractors.Player.getTrackSelector to the ExoPlayer interface.TrackSelection into an ExoTrackSelection
subclass.DefaultTrackSelector.
ParametersBuilder.setTunnelingAudioSessionId has been replaced with
ParametersBuilder.setTunnelingEnabled. The player's audio session ID
will be used, and so a tunneling specific ID is no longer needed.DefaultTrackSelector.
DefaultTrackSelector.ParametersBuilder now includes:
setPreferredVideoMimeType, setPreferredVideoMimeTypes,
setPreferredAudioMimeType and setPreferredAudioMimeTypes for
specifying preferred video and audio MIME type(s)
(#8320).setPreferredAudioLanguages and setPreferredTextLanguages for
specifying multiple preferred audio and text languages.setPreferredAudioRoleFlags for specifying preferred audio role
flags.Timeline and MediaPeriodId to TrackSelection.Factory.EXT-X-PART and preload hints)
(#5011).StyledPlayerControlView button animations.StyledPlayerControlView in minimal mode.ExoMediaDrm.KeyRequest.getRequestType
(#7847).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).MediaItem by
passing a DrmSessionManagerProvider to MediaSourceFactory
(#8466).onEvents callback to Player.EventListener and
AnalyticsListener. When one or more player states change
simultaneously, onEvents is called once after all of the callbacks
associated with the individual state changes.DecoderReuseEvaluation to AnalyticsListener's
onVideoInputFormatChanged and onAudioInputFormatChanged methods. The
DecoderReuseEvaluation indicates whether it was possible to re-use an
existing decoder instance for the new format, and if not then the
reasons why.SimpleExoPlayer now generates an audio session ID on construction,
which can be immediately queried by calling
SimpleExoPlayer.getAudioSessionId. The audio session ID will only
change if application code calls SimpleExoPlayer.setAudioSessionId.onAudioSessionId with onAudioSessionIdChanged in
AudioListener and AnalyticsListener. Note that
onAudioSessionIdChanged is called in fewer cases than
onAudioSessionId was called, due to the improved handling of audio
session IDs as described above.AudioTrack error.AudioTrack instances using the maximum
supported channel count (instead of assuming 6 channels) from API 29.HttpDataSource implementations, default to using the user agent of
the underlying network stack.HttpDataSource.Factory.getDefaultRequestProperties.
HttpDataSource.Factory.setDefaultRequestProperties instead.DefaultHttpDataSource.Factory and deprecate
DefaultHttpDataSourceFactory.ImaAdsLoader.Builder.setEnableContinuousPlayback for setting
whether to request ads for continuous playback.OkHttpDataSource.Factory and deprecate OkHttpDataSourceFactory.CronetDataSource.Factory and deprecate CronetDataSourceFactory.CronetDataSource.Factory and
CronetEngineWrapper.setPlaybackSpeed(float) and disable it by default. Use
MediaSessionConnector.setEnabledPlaybackActions(long) to enable
(#8229).AdaptiveMediaSourceEventListener. Use MediaSourceEventListener
instead.DashMediaSource.Factory.setMinLoadableRetryCount(int). Use
DashMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.DefaultAnalyticsListener. Use AnalyticsListener instead.DefaultLoadControl constructors. Use DefaultLoadControl.Builder
instead.DrmInitData.get(UUID). Use DrmInitData.get(int) and
DrmInitData.SchemeData.matches(UUID) instead.ExtractorsMediaSource.Factory.setMinLoadableRetryCount(int). Use
ExtractorsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.FixedTrackSelection.Factory. If you need to disable adaptive selection
in DefaultTrackSelector, enable the
DefaultTrackSelector.Parameters.forceHighestSupportedBitrate flag.HlsMediaSource.Factory.setMinLoadableRetryCount(int). Use
HlsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.MappedTrackInfo.getTrackFormatSupport(int, int, int). Use
MappedTrackInfo.getTrackSupport(int, int, int) instead.MappedTrackInfo.getTrackTypeRendererSupport(int). Use
MappedTrackInfo.getTypeSupport(int) instead.MappedTrackInfo.getUnassociatedTrackGroups(). Use
MappedTrackInfo.getUnmappedTrackGroups() instead.MappedTrackInfo.length. Use MappedTrackInfo.getRendererCount()
instead.Player.DefaultEventListener.onTimelineChanged(Timeline, Object). Use
Player.EventListener.onTimelineChanged(Timeline, int) instead.Player.setAudioAttributes(AudioAttributes). Use
Player.AudioComponent.setAudioAttributes(AudioAttributes, boolean)
instead.PlayerView.setDefaultArtwork(Bitmap). Use
PlayerView.setDefaultArtwork(Drawable) instead.PlayerView.setShowBuffering(boolean). Use
PlayerView.setShowBuffering(int) instead.SimpleExoPlayer.clearMetadataOutput(MetadataOutput). Use
SimpleExoPlayer.removeMetadataOutput(MetadataOutput) instead.SimpleExoPlayer.clearTextOutput(TextOutput). Use
SimpleExoPlayer.removeTextOutput(TextOutput) instead.SimpleExoPlayer.clearVideoListener(). Use
SimpleExoPlayer.removeVideoListener(VideoListener) instead.SimpleExoPlayer.getAudioStreamType(). Use
SimpleExoPlayer.getAudioAttributes() instead.SimpleExoPlayer.setAudioDebugListener(AudioRendererEventListener). Use
SimpleExoPlayer.addAnalyticsListener(AnalyticsListener) instead.SimpleExoPlayer.setAudioStreamType(int). Use
SimpleExoPlayer.setAudioAttributes(AudioAttributes) instead.SimpleExoPlayer.setMetadataOutput(MetadataOutput). Use
SimpleExoPlayer.addMetadataOutput(MetadataOutput) instead. If your
application is calling SimpleExoPlayer.setMetadataOutput(null), make
sure to replace this call with a call to
SimpleExoPlayer.removeMetadataOutput(MetadataOutput).SimpleExoPlayer.setPlaybackParams(PlaybackParams). Use
SimpleExoPlayer.setPlaybackParameters(PlaybackParameters) instead.SimpleExoPlayer.setTextOutput(TextOutput). Use
SimpleExoPlayer.addTextOutput(TextOutput) instead. If your application
is calling SimpleExoPlayer.setTextOutput(null), make sure to replace
this call with a call to SimpleExoPlayer.removeTextOutput(TextOutput).SimpleExoPlayer.setVideoDebugListener(VideoRendererEventListener). Use
SimpleExoPlayer.addAnalyticsListener(AnalyticsListener) instead.SimpleExoPlayer.setVideoListener(VideoListener). Use
SimpleExoPlayer.addVideoListener(VideoListener) instead. If your
application is calling SimpleExoPlayer.setVideoListener(null), make
sure to replace this call with a call to
SimpleExoPlayer.removeVideoListener(VideoListener).SimpleExoPlayer.VideoListener. Use
com.google.android.exoplayer2.video.VideoListener instead.SingleSampleMediaSource.EventListener and constructors. Use
MediaSourceEventListener and SingleSampleMediaSource.Factory
instead.SimpleExoPlayer.addVideoDebugListener,
SimpleExoPlayer.removeVideoDebugListener,
SimpleExoPlayer.addAudioDebugListener and
SimpleExoPlayer.removeAudioDebugListener. Use
SimpleExoPlayer.addAnalyticsListener and
SimpleExoPlayer.removeAnalyticsListener instead.SingleSampleMediaSource.Factory.setMinLoadableRetryCount(int). Use
SingleSampleMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.SsMediaSource.Factory.setMinLoadableRetryCount(int). Use
SsMediaSource.Factory.setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy)
instead.MediaCodecRenderer issue where empty streams would fail to play in
bypass mode (#8374).LoadErrorHandlingPolicy from
DefaultMediaSourceFactory into SingleSampleMediaSource.Factory when
creating subtitle media sources from
MediaItem.playbackProperties.subtitles
(#8430).StyledPlayerControlView
would not be dismissed when tapping outside of the menu area or pressing
the back button, on API level 22 and earlier
(#8272).DownloadManager that could occur when adding a stopped
download with the same ID as a download currently being removed
(#8419).StyledPlayerControlView
fast forward and rewind buttons, when used together with the
com.google.android.material library
(#7898).dispatchPrepare(Player) to ControlDispatcher and implement it in
DefaultControlDispatcher. Deprecate PlaybackPreparer and
setPlaybackPreparer in StyledPlayerView, StyledPlayerControlView,
PlayerView, PlayerControlView, PlayerNotificationManager and
LeanbackPlayerAdapter and use ControlDispatcher for dispatching
prepare instead
(#7882).StyledPlayerControlView.StyledPlayerControlView menu items to behave correctly for
right-to-left languages.PlayerNotificationManager.AudioManager crashes when calling getStreamVolume
(#8191).AdsLoader
(#7344).ImaAdsLoader builder.styl boxes with start and/or end offsets
that lie outside the length of the cue text.STATE_IDLE or STATE_ENDED.Player.setMediaItems would ignore its resetPosition
argument (#8024).implementation to api
(#7905,
#7993).android.resource URI scheme in RawResourceDataSource
(#7866).StyledPlayerView first shows its playback controls.StyledPlayerView to make tapping easier.subtitleButton to be omitted in custom StyledPlayerView
layouts (#7962).Format in TrackSelectionView and
TrackSelectionDialogBuilder
(#7709)._mp2 boxes
(#7967).pcm_alaw or pcm_mulaw audio
tracks, by enabling sample rechunking for such tracks.DownloadManager.InternalHandler.onContentLengthChanged
(#8078).VideoAdPlayerCallback
(#7944).AdsMediaSource constructor and deprecate
passing them via the ImaAdsLoader 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).To learn more about what's new in 2.12, read the corresponding blog post.
Player:
MediaItem class
(#6161). The new
methods for playlist manipulation are setMediaItem(s),
addMediaItem(s), moveMediaItem(s), removeMediaItem(s) and
clearMediaItems. The playlist can be queried using
getMediaItemCount and getMediaItemAt. This API should be used
instead of ConcatenatingMediaSource in most cases. Learn more by
reading
this blog post.getCurrentMediaItem for getting the currently playing item in
the playlist.EventListener.onMediaItemTransition to report when playback
transitions from one item to another in the playlist.play and pause convenience methods. They are equivalent to
setPlayWhenReady(true) and setPlayWhenReady(false) respectively.getCurrentLiveOffset for getting the offset of the current
playback position from the live edge of a live stream.getTrackSelector for getting the TrackSelector used by the
player.AudioComponent.setAudioSessionId to set the audio session ID.
This method is also available on SimpleExoPlayer.PlaybackParameters.skipSilence, and replace it with
AudioComponent.setSkipSilenceEnabled. This method is also
available on SimpleExoPlayer. An
AudioListener.onSkipSilenceEnabledChanged callback is also added.TextComponent.getCurrentCues to get the current cues. This
method is also available on SimpleExoPlayer. The current cues are
no longer automatically forwarded to a TextOutput when it's added
to a SimpleExoPlayer.Player.DeviceComponent to query and control the device volume.
SimpleExoPlayer implements this interface.getPlaybackError to getPlayerError for
consistency.onLoadingChanged to onIsLoadingChanged for
consistency.EventListener.onPlayerStateChanged, replacing it with
EventListener.onPlayWhenReadyChanged and
EventListener.onPlaybackStateChanged.EventListener.onSeekProcessed because seek changes now
happen instantly and listening to onPositionDiscontinuity is
sufficient.ExoPlayer:
setMediaSource(s) and addMediaSource(s) to ExoPlayer, for
adding MediaSource instances directly to the playlist.ExoPlayer.setPauseAtEndOfMediaItems to let the player pause at
the end of each media item
(#5660).C.TIME_END_OF_SOURCE to PlayerMessage.setPosition
to send a PlayerMessage at the end of a stream.SimpleExoPlayer:
SimpleExoPlayer implements the new MediaItem based playlist API,
using a MediaSourceFactory to convert MediaItem instances to
playable MediaSource instances. A DefaultMediaSourceFactory is
used by default. Builder.setMediaSourceFactory allows setting a
custom factory.MediaItem and
DefaultMediaSourceFactory implementations
(#7937).Builder that were previously only
accessible via setters.setThrowsWhenUsingWrongThread(true)
(#4463).Format:
Builder and deprecate all create methods and most
Format.copyWith methods.bitrate into averageBitrate and peakBitrate
(#2863).LoadControl:
playbackPositionUs parameter to shouldContinueLoading.DefaultLoadControl to
50 seconds (equal to the default maximum buffer), and treat audio
and video the same.MetadataRetriever API for retrieving track information and
static metadata for a media item
(#3609).LoadErrorHandlingPolicy
(#7309).
LoadErrorHandlingPolicy implementations should migrate to implementing
the non-deprecated methods of the interface.MergingMediaSource to adjust the time offsets between
the merged sources
(#6103).MediaSourceEventListener.LoadEventInfo and
MediaSourceEventListener.MediaLoadData to be top-level classes in
com.google.android.exoplayer2.source.SimpleDecoderVideoRenderer and SimpleDecoderAudioRenderer to
DecoderVideoRenderer and DecoderAudioRenderer respectively, and
generalize them to work with Decoder rather than SimpleDecoder.C.MSG_* constants, replacing them with constants in
Renderer.library-core module into library-core, library-common
and library-extractor. The library-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.Surface.setFrameRate on Android 11.DefaultRenderersFactory.setEnableAudioTrackPlaybackParams.DefaultAudioSink for enabling floating point
output. This option can also be set using
DefaultRenderersFactory.setEnableAudioFloatOutput.MediaCodecAudioRenderer
and LibopusAudioRenderer, which is enabled automatically if the
audio sink supports floating point output and if it makes sense for
the content being played.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 on DefaultAudioSink.MediaCodecAudioRenderer, stop passing audio samples through
MediaCodec when playing PCM audio or encoded audio using passthrough
mode.DefaultAudioSink supports passthrough, in addition to checking
the AudioCapabilities
(#7404).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 calling
SubtitleView#setViewType(VIEW_TYPE_WEB).TextRenderer. This fixes a case where playback would never end when
playing content with malformed subtitles
(#7590).CaptionManager font scaling in
SubtitleView.setUserDefaultTextSize if the CaptionManager is
enabled.Cue.lineType=LINE_TYPE_NUMBER in terms of aligning the cue
text lines to grid of viewport lines. Only consider Cue.lineAnchor
when Cue.lineType=LINE_TYPE_FRACTION.line-left, center
and line-right.ruby-position CSS property.text-combine-upright CSS property (i.e., tate-chu-yoko).<ruby> and <rt> tags.tts:combineText property (i.e., tate-chu-yoko).tts:ruby and tts:rubyPosition properties.DefaultTsPayloadReaderFactory into TsExtractor.Extractor sniffing order to reduce start-up latency in
DefaultExtractorsFactory and DefaultHlsExtractorsFactory
(#6410).Extractor sniffing order on a per-media basis.IndexSeeker for accurate seeks in VBR MP3 streams
(#6787). This seeker
can be enabled by passing FLAG_ENABLE_INDEX_SEEKING to the
Mp3Extractor. A significant portion of the file may need to be scanned
when a seek is performed, which may be costly for large files.Format.label with track titles.Invisible block header flag.StyledPlayerView and StyledPlayerControlView, which provide a
more polished user experience than PlayerView and PlayerControlView
at the cost of decreased customizability.SimpleExoPlayerView and
PlaybackControlView classes, along with the corresponding
exo_simple_player_view.xml and exo_playback_control_view.xml layout
resources. Use the equivalent PlayerView, PlayerControlView,
exo_player_view.xml and exo_player_control_view.xml instead.PlayerView and PlayerControlView to set
whether the rewind, fast forward, previous and next buttons are shown
(#7410).TrackSelectionDialogBuilder to use the AndroidX app compat
AlertDialog rather than the platform version, if available
(#7357).ControlDispatcher
(#6926).DownloadRequest.Builder.DownloadRequest.keySetId to make it easier to store an offline
license keyset identifier alongside the other information that's
persisted in DownloadIndex.Executor to DefaultDownloaderFactory on which
data downloads are performed.SegmentDownloader to improve
download speeds
(#5978).CacheDataSinkFactory and CacheDataSourceFactory with
CacheDataSink.Factory and CacheDataSource.Factory respectively.DownloadConstructorHelper and instead use
CacheDataSource.Factory directly.Requirements.DEVICE_STORAGE_NOT_LOW, which can be specified as a
requirement to a DownloadManager for it to proceed with downloading.Exception that caused the failure
to DownloadManager.Listener.onDownloadChanged.SimpleCache.CacheUtil. Equivalent functionality is provided by a new
CacheWriter class, Cache.getCachedBytes, Cache.removeResource and
CacheKeyFactory.DEFAULT.DrmSessionManager into
Renderer instances. DrmSessionManager must now be injected into
MediaSource instances via the MediaSource factories.DefaultDrmSessionManager into
OfflineLicenseHelper
(#7078).cbc1 and cens 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.DefaultDrmSessionEventListener to DrmSessionEventListener.HttpDataSource.InvalidResponseCodeException#responseBody field
(#6853).DataSpec.Builder and deprecate most DataSpec constructors.DataSpec.customData to allow applications to pass custom data
through DataSource chains.CacheDataSinkFactory and CacheDataSourceFactory, which are
replaced by CacheDataSink.Factory and CacheDataSource.Factory
respectively.EventTime with more details about the current player state
(#7332).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 to
DecoderCounters.MediaPeriodId for some renderer errors reported by
AnalyticsListener.onPlayerError.onMediaPeriodCreated, onMediaPeriodReleased and
onReadingStarted from AnalyticsListener.TestExoPlayer, a utility class with APIs to create
SimpleExoPlayer instances with fake components for testing.AdsLoader.AdViewProvider.null
from AdsLoader.AdViewProvider.getAdViewGroup, and allow skipping
audio-only ads via ImaAdsLoader.skipAd
(#7689).ImaAdsLoader.Builder.setCompanionAdSlots so it's possible to set
companion ad slots without accessing the AdDisplayContainer.VideoAdPlayerCallback.onLoaded.extensions variant with decoderExtensions and update the
demo app use the Cronet and IMA extensions by default.exolist.json schema, as well the structure of intents that
can be used to launch PlayerActivity. See the
Demo application page
for the latest versions. Changes include:
drm_session_for_clear_content to allow attaching DRM sessions
to clear audio and video tracks.clip_start_position_ms and clip_end_position_ms to allow
clipped samples.StyledPlayerControlView rather than PlayerView.[-1, 1] nominal range.piff and isml brands
(#7584).saiz and senc sample count checks, resolving a "length mismatch"
ParserException when playing certain protected FMP4 streams
(#7592).traf boxes containing multiple sbgp or sgpd boxes.SCRIPTDATA segments with invalid name types, rather than
failing playback (#7675)..ism and .isml streaming URLs.STATE_ENDED when using video tunneling mode
(#7647).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).stopAd to avoid a crash
(#7492).pauseAd/stopAd for ads that have preloaded on
seeking to another position
(#7492).SilenceMediaSource.Factory to support tags.SilenceSkippingAudioProcessor
(#6705).PlayerMessages throw an exception after MediaSources are
removed from the playlist
(#7278).IllegalStateException in
DownloadService
(#7306).AudioTrackPositionTracker that could cause negative positions
to be reported at the start of playback and immediately after seeking
(#7456).http://dashif.org/guidelines/trickmode) into the same TrackGroup as
the main adaptation sets to which they refer. Trick play tracks are
marked with the C.ROLE_FLAG_TRICK_PLAY flag.SampleQueue when playing DASH streams with
EMSG tracks (#7273).Format.metadata.
Format.frameRate now stores the calculated frame rate.DefaultTimeBar to respect touch transformations
(#7303).showScrubber and hideScrubber methods to DefaultTimeBar.SubtitlePainter to render EDGE_TYPE_OUTLINE using the correct
color.AdsMediaSource child MediaSources not being released.SimpleExoPlayer.setWakeMode to allow automatic WifiLock and
WakeLock handling
(#6914). To use this
feature, you must add the
WAKE_LOCK
permission to your application's manifest file.enableFloatOutput=true
to the DefaultAudioSink constructor
(#7134).AssetIdentifier elements.PlaybackStatsListener behavior when not keeping history
(#7160).x86_64 architecture.play-services-cast-framework dependency to 18.1.0.
This fixes an issue where RemoteServiceException was thrown due to
Context.startForegroundService() not calling Service.startForeground()
(#7191).NullPointerException when playing DRM protected content
(#6951).IcyDecoder to try ISO-8859-1 decoding if UTF-8 decoding fails.
Also change IcyInfo.rawMetadata from String to byte[] to allow
developers to handle data that's neither UTF-8 nor ISO-8859-1
(#6753).SocketTimeoutException issues when using HTTP/2
(#4078).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.GLSurfaceView while applying a GL shader.
(#6920).DefaultTimeBar region from system gesture detection
(#6685).Libgav1VideoRenderer constructor is kept for use by
DefaultRenderersFactory
(#6773).VideoDecoderOutputBuffer and its members are kept for use by
video decoder extensions.RawResourceDataSource are kept.javax.annotation package, and
restructure use of IntDef annotations to remove spurious warnings
about SsaStyle$SsaAlignment
(#6771).CacheDataSource to correctly propagate DataSpec.httpRequestHeaders.DefaultDownloadIndex that could result in an
IllegalStateException being thrown from
DefaultDownloadIndex.getDownloadForCurrentRow
(#6785).IndexOutOfBoundsException in SinglePeriodTimeline.getWindow
(#6776).@Nullable to MediaCodecAudioRenderer.getMediaClock and
SimpleDecoderAudioRenderer.getMediaClock
(#6792).ExoPlayerFactory by SimpleExoPlayer.Builder and
ExoPlayer.Builder.WakeLock handling to SimpleExoPlayer, which can be
enabled by calling SimpleExoPlayer.setHandleWakeLock
(#5846). To use this
feature, you must add the
WAKE_LOCK
permission to your application's manifest file.SimpleExoPlayer,
which can be enabled by calling
SimpleExoPlayer.setHandleAudioBecomingNoisy.DecoderException class and report
them as renderer errors.Timeline.Window.isLive to indicate that a window is a live stream
(#2668 and
#5973).Timeline.Window.uid to uniquely identify window instances.setTag parameter of Timeline.getWindow. Tags will always
be set.Player.EventListener.onTimelineChanged. It can be accessed through
Timeline.Window.manifest or Player.getCurrentManifest()MediaSource.enable and MediaSource.disable to improve resource
management in playlists.MediaPeriod.isLoading to improve Player.isLoading state.Format and renderer support flags to renderer
ExoPlaybackExceptions.MediaCodecList.DrmSessionManager into the MediaSources instead of
Renderers. This allows each MediaSource in a
ConcatenatingMediaSource to use a different DrmSessionManager
(#5619).DefaultDrmSessionManager.Builder, and remove
DefaultDrmSessionManager static factory methods that leaked
ExoMediaDrm instances
(#4721).DefaultDrmSessionManager.Builder's
setUseDrmSessionsForClearContent method.LoadErrorHandlingPolicies in key and
provisioning requests
(#6334). Custom
policies can be passed via DefaultDrmSessionManager.Builder's
setLoadErrorHandlingPolicy method.ExoMediaDrm.Provider in OfflineLicenseHelper to avoid leaking
ExoMediaDrm instances
(#4721).DefaultTrackSelector to set a viewport constraint for the
default display by default.DefaultTrackSelector to set text language and role flag
constraints for the device's accessibility settings by default
(#5749).DefaultTrackSelector.ParametersBuilder.setPreferredTextRoleFlags.prioritizeTimeOverSizeThresholds to false to prevent OOM
errors (#6647).compileSdkVersion to 29 to enable use of Android 10 APIs.isHardwareAccelerated, isSoftwareOnly and isVendor
flags in MediaCodecInfo
(#5839).allowedCapturePolicy field to AudioAttributes to allow to
configuration of the audio capture policy.MediaFormat to VideoFrameMetadataListener.MediaCodecVideoRenderer supports a given video format
(#5568).AdtsExtractor to encounter EOF when calculating average frame
size (#6700).PlayerView.spherical_view surface type to spherical_gl_surface_view.AnalyticsCollector.Factory. Instances should be created
directly, and the Player should be set by calling
AnalyticsCollector.setPlayer.PlaybackStatsListener to collect PlaybackStats for analysis and
analytics reporting.DataSpec.httpRequestHeaders to support setting per-request headers
for HTTP and HTTPS.DataSpec.FLAG_ALLOW_ICY_METADATA flag. Use is replaced by
setting the IcyHeaders.REQUEST_HEADER_ENABLE_METADATA_NAME header in
DataSpec.httpRequestHeaders.VpxVideoSurfaceView to VideoDecoderSurfaceView and move it to
the core library.LibvpxVideoRenderer.MSG_SET_OUTPUT_BUFFER_RENDERER to
C.MSG_SET_OUTPUT_BUFFER_RENDERER.VideoDecoderRenderer as an implementation of
VideoDecoderOutputBufferRenderer, instead of
VideoDecoderSurfaceView.MediaSessionConnector.setCaptionCallback to
support ACTION_SET_CAPTIONING_ENABLED events.SurfaceControl API with ExoPlayer
(#677).testutils module to simplify unit testing with
ExoPlayer (#6267).AdsManager listeners on release to avoid leaking an
AdEventListener provided by the app
(#6687).Format.bitrate values.Player.onPlaybackSuppressionReasonChanged to allow listeners to detect
playbacks suppressions (e.g. transient audio focus loss) directly
(#6203).IcyInfo
(#6476).app:played_color on PlayerView and PlayerControlView no
longer adjusts the colors of the scrubber handle , buffered and unplayed
parts of the time bar. These can be set separately using
app:scrubber_color, app:buffered_color and app_unplayed_color
respectively.app:ad_marker_color on PlayerView and PlayerControlView no
longer adjusts the color of played ad markers. The color of played ad
markers can be set separately using app:played_ad_marker_color.Player.isPlaying and EventListener.onIsPlayingChanged to check
whether the playback position is advancing. This helps to determine if
playback is suppressed due to audio focus loss. Also add
Player.getPlaybackSuppressedReason to determine the reason of the
suppression (#6203).allowAudioMixedChannelCountAdaptiveness parameter to
DefaultTrackSelector to allow adaptive selections of audio tracks with
different channel counts.DefaultBandwidthMeter to initial values on network change.ProgressiveMediaPeriod in case a single extractor
is provided (#6325).HttpDataSource.getResponseCode to provide the status code associated
with the most recent HTTP response.LoadErrorHandlingPolicy classified the error as fatal.PlayerNotificationManager to show play icon rather than pause icon
when playback is ended
(#6324).ImaAdsLoader.onTimelineChanged
(#5831).Scheduler implementation that uses WorkManager.SilenceMediaSource position is in range
(#6229).VORBIS_COMMENT and PICTURE metadata
(#5527).DataSchemeDataSource re-opening and range requests
(#6192).performClick on PlayerView without
PlayerControlView
(#6260).PlayerView incorrectly consuming touch events if no controller is
attached (#6109).Subtype into Format.roleFlags.MediaSessionConnector.play() not resuming
playback (#6093).ResolvingDataSource for just-in-time resolution of DataSpecs
(#5779).SilenceMediaSource that can be used to play silence of a given
duration (#5735).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).ProgressUpdateListener to PlayerControlView
(#5834).DefaultDataSource
(#6036).DefaultRenderersFactory
(#5942).ACCESS_NETWORK_STATE permission
(#6019).maxAudioBitrate for adaptive audio track groups
(#6006).Formats without
bitrate information
(#5971).CastPlayer.getCurrentWindowIndex()
(#5955).NullPointerException when using HLS chunkless preparation
(#5868).ExtractorMediaSource to ProgressiveMediaSource.ProgressiveMediaSource.Factory would mean that
DefaultExtractorsFactory would be kept by proguard. Custom
ExtractorsFactory instances must now be passed via the
ProgressiveMediaSource.Factory constructor, and setExtractorsFactory
is deprecated.PriorityTaskManager from DefaultLoadControl to
SimpleExoPlayer.ExoPlaybackException types for remote exceptions and
out-of-memory errors.Format.FileNotFoundException.MediaSource in
calls to ExoPlayer.prepare causes an IndexOutOfBoundsException
(#5520).DownloadManager now tracks all offline
content, not just tasks in progress. Read
this page for more
details.SimpleCache
(#4253).DataSpec.FLAG_ALLOW_CACHING_UNKNOWN_LENGTH) has been
replaced with an opt out flag
(DataSpec.FLAG_DONT_CACHE_IF_LENGTH_UNKNOWN).DefaultTrackSelector
(#3314).TrackSelection.Factory interface to support creating all track
selections together.SelectionOverride.DefaultTimeBar based on duration of media and add parameter to
set the minimum update interval to control the smoothness of the updates
(#5040).TrackSelectionViews to
TrackSelectionDialogBuilder and add option to select multiple
overrides.PlayerNotificationManager.NotificationListener to
better fit service requirements.PlayerNotificationManager.PlayerNotificationManager and DownloadNotificationUtil. For the
latter, applications should switch to using
DownloadNotificationHelper.DefaultTimeBar
(#5767).AudioProcessors to be drained of pending output after they are
reconfigured.MediaCodecSelector.DEFAULT_WITH_FALLBACK. Apps should instead
signal that fallback should be used by passing true as the
enableDecoderFallback parameter when instantiating the video renderer.MediaCodecList.ALL_CODECS when selecting a tunneling decoder
(#5547).Format.roleFlags.EXT-X-MEDIA CHARACTERISTICS attribute into Format.roleFlags.IndexOutOfBoundsException in some live HLS scenarios
(#5816).scaleToFit and useSurfaceYuvOutput.TimelineQueueNavigator not publishing the queue in
shuffled order when in shuffle mode.registerCustomCommandReceiver.Bundle when reporting a custom error.player and isTopLevelSource parameters from
MediaSource.prepare.Player on AdsLoader instances before playback.ImaAdsMediaSource. Create AdsMediaSource with an
ImaAdsLoader instead.AdsMediaSource constructors. Listen for media source
events using AdsMediaSource.addEventListener, and ad interaction
events by adding a listener when building ImaAdsLoader.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.EventStream presentation timestamps
(#5490).CHANNELS attribute from EXT-X-MEDIA tag.Handler parameter to methods that take a callback Runnable.OnClickListener from receiving events
(#5433).AnalyticsListener.EventTime
(#5407).startPositionUs to MediaSource.createPeriod. This fixes an issue
where using lazy preparation in ConcatenatingMediaSource with an
ExtractorMediaSource overrides initial seek positions
(#5350).MediaDescriptionAdapter of the
PlayerNotificationManager.ClippingMediaSource with an inner
ExtractorMediaSource and a non-zero start position
(#5351).FLAG_ALLOW_NON_IDR_KEYFRAMES.TYPE_ROTATION_VECTOR if
TYPE_GAME_ROTATION_VECTOR is unavailable
(#5119).show_buffering attribute in PlayerView
(#5139).Metadata was output when it failed to decode
(#5149).MediaCrypto when using C.CLEARKEY_UUID before API 27.Player.next, Player.previous, Player.hasNext
and Player.hasPrevious
(#4863).ConcatenatingMediaSource
(#4873).TimelineQueueNavigator
(#5065).SubtitleView had
a non-zero position offset to its parent
(#4788).NullPointerException is thrown when removing an
unprepared media source from a ConcatenatingMediaSource with the
useLazyPreparation option enabled
(#4986).compileOptions { targetCompatibility JavaVersion.VERSION_1_8 } to
their gradle settings to ensure bytecode compatibility.compileSdkVersion and targetSdkVersion to 28.SimpleExoPlayer.setAudioAttributes.ExoPlayer.retry convenience method.AudioListener for listening to changes in audio configuration during
playback (#3994).LoadErrorHandlingPolicy to allow configuration of load error handling
across MediaSource implementations
(#3370).Looper, which specifies the thread that must be used to
access the player, when instantiating player instances using
ExoPlayerFactory
(#4278).BandwidthMeter injection: The BandwidthMeter should now be
passed directly to ExoPlayerFactory, instead of to
TrackSelection.Factory and DataSource.Factory. The BandwidthMeter is
passed to the components that need it internally. The BandwidthMeter may
also be omitted, in which case a default instance will be used.surface_type="spherical_view"
on PlayerView.EXT-X-KEY tags.EXT-X-INDEPENDENT-SEGMENTS in the master playlist.HlsMediaSource.Factory take a factory of trackers instead of a
tracker instance
(#4814).messageData attribute for in-manifest event streams.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING flag must be set on the extractor
to enable this functionality.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING flag must be set on the
extractor to enable this functionality.DefaultExtractorsFactory.setConstantBitrateSeekingEnabled to
enable approximate seeking using a constant bitrate assumption on all
extractors that support it.VideoListener to notify of surface size changes.AudioTrack via
Player.setAuxEffectInfo and Player.clearAuxEffectInfo.AudioTrack buffer sizes to the theoretical maximum required
for each encoding for passthrough playbacks
(#3803).DefaultDrmSessionEventListener and
AnalyticsListener to be notified of acquired and released DRM
sessions.LoadEventInfo in MediaSourceEventListener and
AnalyticsListener callbacks. This uri is the redirected uri if
redirection occurred
(#2054).LoadEventInfo in
MediaSourceEventListener and AnalyticsListener callbacks
(#4361 and
#4615).PlayerView to show buffering view when playWhenReady is
false (#4304).Drawable to be used as PlayerView default artwork.DefaultLoadControl.Builder
(#4857).CacheKeyFactory for setting custom cache keys when
creating a CacheDataSource.TrackSelection.updateSelectedTrack has two new parameters for the current
queue of media chunks and iterators for information about upcoming chunks.MediaCodecSelectors to return multiple compatible decoders for
MediaCodecRenderer, and provide an (optional) MediaCodecSelector that
falls back to less preferred decoders like MediaCodec.createDecoderByType
(#273).SingleSampleMediaSource
(#4771).Player.getTotalBufferedDuration and
Player.getContentBufferedDuration
(#4023).player.getCurrentTag() throws an
IndexOutOfBoundsException
(#4822).multiSession=true)
for non-Widevine DefaultDrmSessionManager instances
(#4834).MediaSessionConnector.setCustomErrorMessage to support setting
custom error messages.MediaMetadataProvider to support setting custom metadata
(#3497).ImaAdsLoader
(#3879).PlayerView.isControllerVisible
(#4385).DefaultTimeBar
(#4611).MediaSource loads are slow to cancel
(#4249).Player.EventListener invocations for recursive player
state changes (#4276).MediaCodec.native_setSurface crash on Moto C
(#4315).METADATA_KEY_TITLE on media descriptions
(#4292).InvalidResponseCodeExceptions.PlayerMessages.PlayerView.setKeepContentOnPlayerReset to keep the currently
displayed video frame or media artwork visible when the player is reset
(#2843).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.DynamicConcatenatingMediaSource into ConcatenatingMediaSource
and deprecated DynamicConcatenatingMediaSource.ClippingMediaSource.MediaSourceEventListeners to MediaSources
after they have been created. Listening to events is now supported for
all media sources including composite sources.MediaSourceEventListener to get notified when media
periods are created, released and being read from.ClippingMediaSource.Player.getCurrentTag.PlayerView.AspectRatioFrameLayout's aspect ratio
update (#3736).PlayerNotificationManager for displaying notifications reflecting
the player state.TrackSelectionView for selecting tracks with
DefaultTrackSelector.TrackNameProvider for converting track Formats to textual
descriptions, and DefaultTrackNameProvider as a default
implementation.MappingTrackSelector and DefaultTrackSelector.DefaultTrackSelector.Parameters now implements Parcelable.AudioTrack position tracking from DefaultAudioSink.PlaybackParameters
(#2635).AudioProcessors
(#3142).Cache interface, and prevent multiple
instances of SimpleCache using the same folder at the same time.MediaSourceEventListener on
AdsMediaSource, and allow setting an ad event listener on
ImaAdsLoader. Deprecate the AdsMediaSource.EventListener.AnalyticsListener interface which can be registered in
SimpleExoPlayer to receive detailed metadata for each ExoPlayer event.DefaultLoadControl.getPlaybackError to Player interface.AdaptiveTrackSelection to
DefaultBandwidthMeter.BaseRenderer.onStreamChanged.Timeline.Window.windowStartTimeMs field
(#3865,
#3888).MediaCodecVideoRenderer and
LibvpxVideoRenderer, even if it is late.stop to reset the player when stopping.EventListener.onTimelineChanged to distinguish between
initial preparation, reset and dynamic updates.Player.DISCONTINUITY_REASON_AD_INSERTION to the possible reasons
reported in Eventlistener.onPositionDiscontinuity to distinguish
transitions to and from ads within one period from transitions between
periods.ExoPlayer.sendMessages with ExoPlayer.createMessage to
allow more customization of the message. Now supports setting a message
delivery playback position and/or a delivery handler
(#2189).Player.VideoComponent, Player.TextComponent and
Player.MetadataComponent interfaces that define optional video, text
and metadata output functionality. New getVideoComponent,
getTextComponent and getMetadataComponent methods provide access to
this functionality.ExoPlayer.setSeekParameters for controlling how seek operations are
performed. The SeekParameters 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.Parameters copy methods with a builder.LoadControl implementations.SequenceableLoader to re-evaluate its buffer and
discard buffered media so that it can be re-buffered in a different
quality.CompositeSequenceableLoader factories through
DashMediaSource.Factory, HlsMediaSource.Factory,
SsMediaSource.Factory, and MergingMediaSource.Player, and renamed them to PlayerView and PlayerControlView
respectively.PlayerView automatically apply video rotation when configured to
use TextureView
(#91).PlayerView play button behave correctly when the player is ended
(#3689), and call a
PlaybackPreparer when the player is idle.urn:mpeg:dash:event:2012 and scheme values "1", "2" and "3".CacheDataSource to see whether it's
possible to switch to reading/writing the cache having initially
bypassed it.EventLogger moved from the demo app into the core library.sys.display-size on Philips ATVs
(#3807).Extractors on the loading thread to avoid potentially leaking
resources when the playback thread has quit by the time the loading task has
completed.ExtractorMediaSource, HlsMediaSource, SsMediaSource,
DashMediaSource and SingleSampleMediaSource.MediaSourceEventListener for all MediaSource
implementations.DefaultAudioSink, and add an
option to use this with FfmpegAudioRenderer.DefaultLoadControl to set maximum buffer size in bytes and
to choose whether size or time constraints are prioritized.DummySurface, if available
(#3558).Player.DefaultEventListener abstract class can be extended to avoid
having to implement all methods defined by Player.EventListener.EventListener.onPositionDiscontinuity
(#3252).setShuffleModeEnabled method for enabling shuffled playback.Renderers that don't consume any media
(#3212).Player.onPositionDiscontinuity. DISCONTINUITY_REASON_SEEK_ADJUSTMENT is
added to disambiguate position adjustments during seeks from other types of
internal position discontinuity.IndexOutOfBoundsException when calling
ExoPlayer.getDuration
(#3362).ContentDataSource when reading from certain
ContentProvider implementations
(#3426).SingleSampleMediaSource to suppress load errors
(#3140).DynamicConcatenatingMediaSource: Allow specifying a callback to be invoked
after a dynamic playlist modification has been applied
(#3407).AudioSink interface allows customization of audio output path.Downloader implementations for DASH, HLS, SmoothStreaming
and progressive streams.HlsMediaSource.IndexOutOfBoundsException when using ImaMediaSource
(#3334).ExoPlayer.prepare is called with
resetPosition set to false.FrameworkMediaCrypto and by making DefaultDashChunkSource.getNextChunk
non-final.THREAD_PRIORITY_AUDIO.FLAG_ENABLE_CONSTANT_BITRATE_SEEKING extractor option to enable
constant bitrate seeking in MP3 files that would otherwise be unseekable
(#2445)..mp3 tracks
(#2066).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.
com.google.android.exoplayer2. The library
structure and class names have also been sanitized. Read more
here.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.
.mp3 tracks
(#2066).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.