Releases: google/ExoPlayer
Releases · google/ExoPlayer
r2.17.1
This release corresponds to the AndroidX media3 1.0.0-alpha03 release.
- Audio:
- Fix error checking audio capabilities for Dolby Atmos (E-AC3-JOC) in HLS.
- Extractors:
- FMP4: Fix issue where emsg sample metadata could be output in the wrong order for streams containing both v0 and v1 emsg atoms (#9996).
- Text:
- Fix the interaction of
SingleSampleMediaSource.Factory.setTrackIdandMediaItem.SubtitleConfiguration.Builder.setIdto prioritise theSubtitleConfigurationfield and fall back to theFactoryvalue if it's not set (#10016).
- Fix the interaction of
- Ad playback:
- Fix audio underruns between ad periods in live HLS SSAI streams.
r2.17.0
- Core library:
- Sleep and retry when creating a
MediaCodecinstance fails. This works around an issue that occurs on some devices when switching a surface from a secure codec to another codec (#8696). - Add
MediaCodecAdapter.getMetrics()to allow users obtain metrics data fromMediaCodec(#9766). - Fix Maven dependency resolution (#8353).
- Disable automatic speed adjustment for live streams that neither have low-latency features nor a user request setting the speed (#9329).
- Rename
DecoderCounters#inputBufferCounttoqueuedInputBufferCount. - Make
SimpleExoPlayer.renderersprivate. Renderers can be accessed viaExoPlayer.getRenderer. - Updated some
AnalyticsListener.EventFlagsconstant values to match values inPlayer.EventFlags. - Split
AnalyticsCollectorinto an interface and default implementation to allow it to be stripped by R8 if an app doesn't need it.
- Sleep and retry when creating a
- Track selection:
- Support preferred video role flags in track selection (#9402).
- Update video track selection logic to take preferred MIME types and role flags into account when selecting multiple video tracks for adaptation (#9519).
- Update video and audio track selection logic to only choose formats for adaptive selections that have the same level of decoder and hardware support (#9565).
- Update video track selection logic to prefer more efficient codecs if multiple codecs are supported by primary, hardware-accelerated decoders (#4835).
- Prefer audio content preferences (for example, the "default" audio track or a track matching the system locale language) over technical track selection constraints (for example, preferred MIME type, or maximum channel count).
- Prohibit duplicate
TrackGroups in aTrackGroupArray.TrackGroups can always be made distinguishable by setting anidin theTrackGroupconstructor. This fixes a crash when resuming playback after backgrounding the app with an active track override
(#9718). - Amend logic in
AdaptiveTrackSelectionto allow a quality increase under sufficient network bandwidth even if playback is very close to the
live edge (#9784).
- Video:
- Fix decoder fallback logic for Dolby Vision to use a compatible H264/H265 decoder if needed.
- Audio:
- Fix decoder fallback logic for Dolby Atmos (E-AC3-JOC) to use a compatible E-AC3 decoder if needed.
- Change
AudioCapabilitiesAPIs to require passing explicitlyAudioCapabilities.DEFAULT_AUDIO_CAPABILITIESinstead ofnull. - Allow customization of the
AudioTrackbuffer size calculation by injecting anAudioTrackBufferSizeProvidertoDefaultAudioSink(#8891). - Retry
AudioTrackcreation if the requested buffer size was > 1MB (#9712).
- Extractors:
- Fix incorrect parsing of H.265 SPS NAL units (#9719).
- Parse Vorbis Comments (including
METADATA_BLOCK_PICTURE) in Ogg Opus and Ogg Vorbis files.
- Text:
- Add a
MediaItem.SubtitleConfiguration.idfield which is propagated to theFormat.idfield of the subtitle track created from the configuration (#9673). - Add basic support for WebVTT subtitles in Matroska containers (#9886).
- Prevent
Cea708Decoderfrom reading more than the declared size of a service block.
- Add a
- DRM:
- Remove
playbackLooperfromDrmSessionManager.(pre)acquireSession. When aDrmSessionManageris used by an app in a customMediaSource, theplaybackLooperneeds to be passed toDrmSessionManager.setPlayerinstead.
- Remove
- Ad playback / IMA:
- Add support for IMA Dynamic Ad Insertion (DAI) (#8213).
- Add a method to
AdPlaybackStateto allow resetting an ad group so that it can be played again (#9615). - Enforce playback speed of 1.0 during ad playback (#9018).
- Fix issue where an ad group that failed to load caused an immediate playback reset (#9929).
- UI:
- DASH:
- HLS:
- Use chunkless preparation by default to improve start up time. If your renditions contain muxed closed-caption tracks that are not declared in the master playlist, you should add them to the master playlist to be available for playback, or turn off chunkless preparation with
HlsMediaSource.Factory.setAllowChunklessPreparation(false). - Support key-frame accurate seeking in HLS (#2882).
- Correctly populate
Format.labelfor audio only HLS streams (#9608).
- Use chunkless preparation by default to improve start up time. If your renditions contain muxed closed-caption tracks that are not declared in the master playlist, you should add them to the master playlist to be available for playback, or turn off chunkless preparation with
- RTSP:
- Transformer:
- Increase required min API version to 21.
TransformationExceptionis now used to describe errors that occur during a transformation.- Add
TransformationRequestfor specifying the transformation options. - Allow multiple listeners to be registered.
- Fix Transformer being stuck when the codec output is partially read.
- Fix potential NPE in
Transformer.getProgresswhen releasing the muxer throws. - Add a demo app for applying transformations.
- The transformer module is no longer included by depending on
com.google.android.exoplayer:exoplayer. To continue using transformer, add an additional dependency oncom.google.android.exoplayer:exoplayer-transformer.
- MediaSession extension:
- By default,
MediaSessionConnectornow clears the playlist on stop. Apps that want the playlist to be retained can callsetClearMediaItemsOnStop(false)on the connector.
- By default,
- Cast extension:
- FFmpeg extension:
- Make
build_ffmpeg.shdepend on LLVM's bin utils instead of GNU's (#9933).
- Make
- Android 12 compatibility:
- Upgrade the Cast extension to depend on
com.google.android.gms:play-services-cast-framework:20.1.0. Earlier versions ofplay-services-cast-frameworkare not compatible with apps targeting Android 12, and will crash with anIllegalArgumentExceptionwhen creatingPendingIntents (#9528).
- Upgrade the Cast extension to depend on
- Remove deprecated symbols:
- Remove
Player.EventListener. UsePlayer.Listenerinstead. - Remove
MediaSourceFactory#setDrmSessionManager,MediaSourceFactory#setDrmHttpDataSourceFactory, andMediaSourceFactory#setDrmUserAgent. UseMediaSourceFactory#setDrmSessionManagerProviderinstead. - Remove
MediaSourceFactory#setStreamKeys. UseMediaItem.Builder#setStreamKeysinstead. - Remove
MediaSourceFactory#createMediaSource(Uri). UseMediaSourceFactory#createMediaSource(MediaItem)instead. - Remove
setTagfromDashMediaSource,HlsMediaSourceandSsMediaSource. UseMediaItem.Builder#setTaginstead. - Remove
DashMediaSource#setLivePresentationDelayMs(long, boolean). UseMediaItem.Builder#setLiveConfigurationandMediaItem.LiveConfiguration.Builder#setTargetOffsetMsto override the manifest, orDashMediaSource#setFallbackTargetLiveOffsetMsto provide a fallback value. - Remove
(Simple)ExoPlayer.setThrowsWhenUsingWrongThread. Opting out of the thread enforcement is no longer possible. - Remove
ActionFileandActionFileUpgradeUtil. Use ExoPlayer 2.16.1 or before to useActionFileUpgradeUtilto merge legacy action files intoDefaultDownloadIndex. - Remove `ProgressiveMedia...
- Remove
r2.16.1
- Core Library:
- Fix track selection issue where overriding one track group did not disable other track groups of the same type (#9675).
- Fix track selection issue where a mixture of non-empty and empty track overrides is not applied correctly (#9649).
- Add protected method
DefaultRenderersFactory.getCodecAdapterFactory()so that subclasses ofDefaultRenderersFactorythat overridebuildVideoRenderers()orbuildAudioRenderers()can access the codec adapter factory and pass it toMediaCodecRendererinstances they create. - Propagate ICY header fields
nameandgenretoMediaMetadata.stationandMediaMetadata.genrerespectively so that
they reach the app viaPlayer.Listener.onMediaMetadataChanged()(#9677). - Remove null keys from
DefaultHttpDataSource#getResponseHeaders.
- Extractors:
- WAV: Add support for RF64 streams (#9543).
- DASH:
- Add parsed essential and supplemental properties to the
Representation(#9579).
- Add parsed essential and supplemental properties to the
- HLS:
- Correctly populate
Format.labelfor audio only HLS streams (#9608).
- Correctly populate
r2.16.0
- Core Library:
- Deprecate
SimpleExoPlayer. All functionality has been moved toExoPlayerinstead.ExoPlayer.Buildercan be used instead ofSimpleExoPlayer.Builder. - Add track selection methods to the
Playerinterface, for example,Player.getCurrentTracksInfoandPlayer.setTrackSelectionParameters. These methods can be used instead of directly accessing the track selector. - Enable MediaCodec asynchronous queueing by default on devices with API level >= 31. Add methods in
DefaultMediaCodecRendererFactoryandDefaultRenderersFactoryto force enable or force disable asynchronous queueing (6348). - Remove final dependency on
jcenter(). - Fix
mediaMetadatabeing reset when media is repeated (#9458). - Adjust
ExoPlayerMediaMetadataupdate priority, such that values input through theMediaItem.MediaMetadataare used above media derived values. - Move
com.google.android.exoplayer2.device.DeviceInfotocom.google.android.exoplayer2.DeviceInfo. - Move
com.google.android.exoplayer2.drm.DecryptionExceptiontocom.google.android.exoplayer2.decoder.CryptoException. - Move
com.google.android.exoplayer2.upstream.cache.CachedRegionTrackertocom.google.android.exoplayer2.upstream.CachedRegionTracker. - Move
Player.addListener(EventListener)andPlayer.removeListener(EventListener)out ofPlayerinto subclasses.
- Deprecate
- Android 12 compatibility:
- Keep
DownloadServicestarted 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.getSchedulerwill not be called on Android 12 devices. - Disable platform transcoding when playing content URIs on Android 12.
- Add
ExoPlayer.setVideoChangeFrameRateStrategyto allow disabling of calls from the player toSurface.setFrameRate. This is useful for applications wanting to callSurface.setFrameRatedirectly from application code with Android 12'sSurface.CHANGE_FRAME_RATE_ALWAYS. - Upgrade the WorkManager extension to depend on
androidx.work:work-runtime:2.7.0. Earlier versions ofwork-runtime
are not compatible with apps targeting Android 12, and will crash with anIllegalArgumentExceptionwhen creatingPendingIntents (#9181).
- Keep
- Video:
- Fix bug in
MediaCodecVideoRendererthat resulted in re-using a releasedSurfacewhen playing without an app-providedSurface(#9476).
- Fix bug in
- DRM:
- Log an error (instead of throwing
IllegalStateException) when callingDefaultDrmSession#release()on a fully released session
(#9392).
- Log an error (instead of throwing
- UI:
- Extractors:
- MP4: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
- MP4: Add support for Dolby TrueHD (only for unfragmented streams) (#9496).
- MP4: Avoid throwing
ArrayIndexOutOfBoundsExceptionwhen parsing invalidcolrboxes produced by some device cameras (#9332). - MP4: Parse HDR static metadata from the
clliandmdcvboxes. - TS: Correctly handle HEVC tracks with pixel aspect ratios other than 1.
- TS: Map stream type 0x80 to H262 (#9472).
- Downloads and caching:
- Modify
DownloadServicebehavior whenDownloadService.getSchedulerreturnsnull, or returns aSchedulerthat does not support the requirements for downloads to continue. In both cases,DownloadServicewill now remain started and in the foreground whilst waiting for requirements to be met. - Modify
DownloadServicebehavior when running on Android 12 and above. See the "Android 12 compatibility" section above.
- Modify
- RTSP:
- Support RFC4566 SDP attribute field grammar (#9430).
- DASH:
- Populate
Format.sampleMimeType,widthandheightfor imageAdaptationSetelements (#9500).
- Populate
- HLS:
- RTMP extension:
- Upgrade to
io.antmedia:rtmp_client, which does not rely onjcenter()(#9591).
- Upgrade to
- MediaSession extension:
- Rename
MediaSessionConnector.QueueNavigator#onCurrentWindowIndexChangedtoonCurrentMediaItemIndexChanged.
- Rename
- Transformer:
- Avoid sending a duplicate timestamp to the encoder with the end of stream buffer.
- Remove deprecated symbols:
- Remove
Renderer.VIDEO_SCALING_MODE_*constants. Use identically named constants inCinstead. - Remove
C.MSG_*constants. Use identically named constants inRendererinstead, except forC.MSG_SET_SURFACE, which is replaced withRenderer.MSG_SET_VIDEO_OUTPUT. - Remove
DeviceListener. UsePlayer.Listenerinstead. - Remove
CacheDataSourceFactory. UseCacheDataSource.Factoryinstead. - Remove
CacheDataSinkFactory. UseCacheDataSink.Factoryinstead. - Remove
FileDataSourceFactory. UseFileDataSource.Factoryinstead. - Remove
SimpleExoPlayer.addMetadataOutputandremoveMetadataOutput. UsePlayer.addListenerandPlayer.Listenerinstead. - Remove
SimpleExoPlayer.addAudioListener,removeAudioListenerandAudioListener. UsePlayer.addListenerandPlayer.Listenerinstead. - Remove
SimpleExoPlayer.addVideoListener,removeVideoListenerandVideoListener. UsePlayer.addListenerandPlayer.Listenerinstead. - Remove
DefaultHttpDataSourceFactory. UseDefaultHttpDataSource.Factoryinstead. - Remove
SingleSampleMediaSource.createMediaSource(Uri, Format, long). UseSingleSampleMediaSource.createMediaSource(MediaItem.Subtitle, long)instead. - Remove
HttpDataSource.Factory.getDefaultRequestProperties. UseHttpDataSource.Factory.setDefaultRequestPropertiesinstead. - Remove
GvrAudioProcessorand the GVR extension, which has been deprecated since 2.11.0. - Remove
DownloadService.onDownloadChangedandDownloadService.onDownloadRemoved. Instead, use
DownloadManager.addListenerto register a listener directly to theDownloadManagerreturned throughDownloadService.getDownloadManager. - Remove
Player.getCurrentStaticMetadata,Player.Listener.onStaticMetadataChangedand
Player.EVENT_STATIC_METADATA_CHANGED. UsePlayer.getMediaMetadata,Player.Listener.onMediaMetadataChangedand
Player.EVENT_MEDIA_METADATA_CHANGEDfor convenient access to structured metadata, or access the raw static metadata directly from theTrackSelection#getFormat(). - Remove
ControlDispatcherandDefaultControlDispatcher. Operations can be customized by using aForwardingPlayer, or when configuring the player (for example by usingExoPlayer.Builder.setSeekBackIncrementMs).
- Remove
r2.15.1
- Core Library:
- Fix track selection in
StyledPlayerControlViewwhen usingForwardingPlayer. - Fix
FlagSet#equalson API levels below 24. - Fix
NullPointerExceptionbeing thrown fromCacheDataSourcewhen reading a fully cached resource withDataSpec.positionequal to the resource length. - Fix a bug when depending on ExoPlayer locally with a relative path (#9403).
- Better handle invalid seek requests. Seeks to positions that are before the start or after the end of the media are now handled as seeks to the start and end respectively (8906).
- Rename
MimeTypes.AUDIO_DTS_UHDtoMimeTypes.AUDIO_DTS_Xand add required profile to its value (#9429).
- Fix track selection in
- Extractors:
- Video:
- Request smaller decoder input buffers for Dolby Vision. This fixes an issue that could cause UHD Dolby Vision playbacks to fail on some devices, including Amazon Fire TV 4K.
- DRM:
- Fix
DefaultDrmSessionManagerto correctly eagerly release preacquired DRM sessions when there's a shortage of DRM resources on the device.
- Fix
- Downloads and caching:
- Workaround platform issue that can cause a
SecurityExceptionto be thrown fromRequirements.isInternetConnectivityValidatedon devices running Android 11 (#9002).
- Workaround platform issue that can cause a
- DASH:
- Use identical cache keys for downloading and playing DASH segments (#9370).
- Fix base URL selection and load error handling when base URLs are shared across adaptation sets.
- HLS:
- Fix bug where the player would get stuck if all download attempts fail and would not raise an error to the application (#9390).
- RTSP:
- UI:
- Cast extension:
- Implement
CastPlayer.setPlaybackParameters(PlaybackParameters)to support setting the playback speed (#6784).
- Implement
r2.15.0
- Core Library:
- Add
MediaCodecAdapter.needsReconfigurationmethod. - Add
getSeekBackIncrement,seekBack,getSeekForwardIncrement,seekForward,getMaxSeekToPreviousPosition,seekToPreviousandseekToNextmethods toPlayer. - Rename
Playermethods:hasPrevioustohasPreviousWindow.previoustoseekToPreviousWindow.hasNexttohasNextWindow.nexttoseekToNextWindow.
- Rename
Playercommands:COMMAND_SEEK_IN_CURRENT_MEDIA_ITEMtoCOMMAND_SEEK_IN_CURRENT_WINDOW.COMMAND_SEEK_TO_NEXT_MEDIA_ITEMtoCOMMAND_SEEK_TO_NEXT_WINDOW.COMMAND_SEEK_TO_PREVIOUS_MEDIA_ITEMtoCOMMAND_SEEK_TO_PREVIOUS_WINDOW.COMMAND_SEEK_TO_MEDIA_ITEMtoCOMMAND_SEEK_TO_WINDOW.COMMAND_GET_MEDIA_ITEMStoCOMMAND_GET_TIMELINE.
- Rename
Player.EventFlagsIntDef toPlayer.Event. - Make
Playerdepend on the newPlaybackExceptionclass instead ofExoPlaybackException:Player.getPlayerErrornow returns aPlaybackException.Player.Listener.onPlayerErrornow receives aPlaybackException.- Add a new listener method
Player.Listener.onPlayerErrorChanged, which is equivalent toonPlayerErrorexcept that it is also called when the player error becomesnull. Playerimplementations likeExoPlayermay usePlaybackExceptionsubclasses (likeExoPlaybackException), so users can downcast thePlaybackExceptioninstance to obtain implementation-specific fields (likeExoPlaybackException.rendererIndex).
PlaybackExceptionintroduces anerrorCodewhich identifies the cause of the failure in order to simplify error handling (#1611).- Add a
DefaultMediaDescriptionAdapterfor thePlayerNotificationManager, that makes use of thePlayerMediaMetadatato populate the notification fields. - Add
@FallbackTypetoLoadErrorHandlingPolicyto support customization of the exclusion duration for locations and tracks. - Change interface of
LoadErrorHandlingPolicyto support configuring the behavior of track and location fallback. Location fallback is currently only supported for DASH manifests with multiple base URLs. - Restrict use of
AudioTrack.isDirectPlaybackSupportedto TVs, to avoid listing audio offload encodings as supported for passthrough mode on mobile devices (#9239).
- Add
- Extractors:
- Add support for DTS-UHD in MP4 (#9163).
- Text:
- TTML: Inherit the
rubyPositionvalue from a containing<span ruby="container">element. - WebVTT: Add support for CSS
font-sizeproperty (#8964).
- TTML: Inherit the
- Ad playback:
- Support changing ad break positions in the player logic (#5067).
- Support resuming content with an offset after an ad group.
- UI:
- Add
setUseRewindActionandsetUseFastForwardActiontoPlayerNotificationManager, andsetUseFastForwardActionInCompactViewandsetUseRewindActionInCompactViewto show the actions in compact view mode. - Remove
rewind_incrementandfastforward_incrementattributes fromPlayerControlViewandStyledPlayerControlView. These increments can be customized by configuring thePlayer(seesetSeekBackIncrementMsandsetSeekForwardIncrementMsinSimpleExoPlayer.Builder), or by using aForwardingPlayerthat overridesgetSeekBackIncrement,seekBack,getSeekForwardIncrementandseekForward. The rewind and fast forward buttons can be disabled by using aForwardingPlayerthat removesCOMMAND_SEEK_BACKandCOMMAND_SEEK_FORWARDfrom the available commands. - Update
DefaultControlDispatchergetRewindIncrementMsandgetFastForwardIncrementMsto take the player as parameter.
- Add
- DASH:
- HLS:
- RTSP:
- SmoothStreaming:
- Propagate
StreamIndexelementNameattribute value asFormatlabel (#9252).
- Propagate
- Cronet extension:
- Add
CronetDataSource.Factory.setRequestPriorityto allow setting the priority of requests made byCronetDataSourceinstances.
- Add
- OkHttp extension:
- Switch to OkHttp 4.9.1. This increases the extension's minimum SDK version requirement from 16 to 21.
- Remove deprecated symbols:
- Remove
CastPlayerspecific playlist manipulation methods. UsesetMediaItems,addMediaItems,removeMediaItemandmoveMediaIteminstead. - Remove
Format.createmethods. UseFormat.Builderinstead. - Remove
MediaSource.getTag. UseMediaSource.getMediaItemandMediaItem.PlaybackProperties.taginstead. - Remove
PlaybackPreparer. UI components that previously hadsetPlaybackPreparermethods will now callPlayer.prepareby default. If this behavior is sufficient, use ofPlaybackPreparercan be removed from application code without replacement. For custom preparation logic, use aForwardingPlayerthat implements custom preparation logic inprepare. - Remove
Player.Listener.onTimelineChanged(Timeline, Object, int). UsePlayer.Listener.onTimelineChanged(Timeline, int)instead. The manifest can be accessed usingPlayer.getCurrentManifest. - Remove
Player.getCurrentTag. UsePlayer.getCurrentMediaItemandMediaItem.PlaybackProperties.taginstead. - Remove
Player.getPlaybackError. UsePlayer.getPlayerErrorinstead. - Remove
PlayerNotificationManagerconstructors andcreateWithmethods. UsePlayerNotificationManager.Builderinstead. - Remove
PlayerNotificationManager.setNotificationListener. UsePlayerNotificationManager.Builder.setNotificationListenerinstead. - Remove
PlayerNotificationManagersetUseNavigationActionsandsetUseNavigationActionsInCompactView. UsesetUseNextAction,setUsePreviousAction,setUseNextActionInCompactViewandsetUsePreviousActionInCompactViewinstead. - Remove
setRewindIncrementMsandsetFastForwardIncrementMsfrom UI components. These increments can be customized by configuring thePlayer(seesetSeekBackIncrementMsandsetSeekForwardIncrementMsinSimpleExoPlayer.Builder), or by using aForwardingPlayerthat overridesgetSeekBackIncrement,seekBack,getSeekForwardIncrementandseekForward. The rewind and fast forward buttons can be disabled by using aForwardingPlayerthat removesCOMMAND_SEEK_BACKandCOMMAND_SEEK_FORWARDfrom the available commands. - Remove
Timeline.getWindow(int, Window, boolean). UseTimeline.getWindow(int, Window)instead, which will always set tags.
- Remove
r2.14.2
- Core Library:
- Explicitly mark several methods on
SimpleExoPlayeras@Deprecated. These methods are all overrides and are already deprecated onPlayerand the respectiveExoPlayercomponent classes (since 2.14.0).
- Explicitly mark several methods on
- Video:
- Fix
IncorrectContextUseViolationstrict mode warning on Android 11 (#8246).
- Fix
- Audio:
- Fix track selection for E-AC-3 streams.
- Use
AudioTrack.isDirectPlaybackSupportedto check for encoded audio passthrough capability from API 29 onwards, instead of using the HDMI audio plug intent (#6500).
- Extractors:
- Fix issue where a
trunatom could be associated with the wrong track in an FMP4 stream (#9056). The fix removes a previous workaround to handle content in which thetrack_IDis set incorrectly (#4083). Such content is malformed and should be re-encoded. - Improve support for truncated Ogg streams (#7608).
- Add support for MP4 H263 atom type (#9158).
- Fix issue around TS synchronization when reading a file's duration (#9100).
- Fix issue where a
- HLS:
- Fix issue where playback of a live event could become stuck rather than transitioning to
STATE_ENDEDwhen the event ends (#9067). - Fix issue where a new initialization segment, as specified by an
EXT-X-MAPtag in a media playlist, would not be loaded when encountered during playback (#9004). - Forward the FRAME-RATE value from the master playlist to renditions (#8960).
- Fix issue where HLS events would start at positions greater than specified by an
EXT-X-STARTtag when placed in a playlist (#9037).
- Fix issue where playback of a live event could become stuck rather than transitioning to
- Ad playback:
- Use the content URI when auto-generating an ad ID (in addition to the media ID and ad tag URI) (#9106.
- DRM:
- Allow repeated provisioning in
DefaultDrmSession(Manager). - Fix a crash due to
DefaultDrmSessionManager.release()incorrectly releasing too many keep-aliveDefaultDrmSessionreferences, resulting inDefaultDrmSession.release()throwing anIllegalStateException(#9193).
- Allow repeated provisioning in
- Metadata:
- Fix handling of emsg messages with an unset duration (#9123).
- UI:
- Add
PendingIntent.FLAG_IMMUTABLEflag when creating a broadcast intent inPlayerNotificationManager. This is required to avoid an error on Android 12. - Fix focusability of
StyledPlayerViewandStyledPlayerControlViewpopup menus on API levels prior to 26 (#9061). - Fix progress bar flickering immediately after the user seeks (#9049).
- Fix
StyledPlayerViewandStyledPlayerControlViewpopup menu items not expanding to occupy the full width of the popup (#9086). - Don't propagate
AttributeSetfromSubtitleViewconstructor intoCanvasSubtitleOutput. Just passing theContextis enough, and ensures programmatic changes to theSubtitleViewwill propagate down.
- Add
- RTSP:
r2.14.1
- Core Library:
- Fix gradle config to allow specifying a relative path for
exoplayerRootwhen depending on ExoPlayer locally
(#8927). - Update
MediaItem.Builderjavadoc to discourage calling setters that will be (currently) ignored if another setter is not also called.
- Fix gradle config to allow specifying a relative path for
- Extractors:
- Add support for MPEG-H 3D Audio in MP4 extractors (#8860).
- Video:
- Fix bug that could cause
CodecException: Error 0xffffffffto be thrown fromMediaCodec.native_setSurfacein use cases that involve both swapping the outputSurfaceand a mixture of secure and non-secure content being played (#8776).
- Fix bug that could cause
- HLS:
- Use the
PRECISEattribute inEXT-X-STARTto select the default start position. - Fix a bug where skipping into spliced-in chunks triggered an assertion error (#8937).
- Use the
- DRM:
- Keep secure
MediaCodecinstances initialized when disabling (but not resetting)MediaCodecRenderer. This helps re-use secure decoders in more contexts, which avoids the 'black flash' caused by detaching aSurfacefrom a secure decoder on some devices (#8842). It will also result in DRM license refresh network requests while the player is stopped ifPlayer#setForegroundModeis true. - Fix issue where offline keys were unnecessarily (and incorrectly) restored into a session before being released. This call sequence is explicitly disallowed in OEMCrypto v16.
- Keep secure
- UI:
- Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko) in
Cue.texteven whenSubtitleView#setApplyEmbeddedStyles()isfalse. - Fix
NullPointerExceptioninStyledPlayerViewthat could occur after callingStyledPlayerView.setPlayer(null)(#8985).
- Keep subtitle language features embedded (e.g. rubies & tate-chu-yoko) in
- RTSP:
- GL demo app:
- Fix texture transformation to avoid green bars shown on some videos (#8992).
r2.14.0
- Core Library:
- Move
Playercomponents toExoPlayer. For examplePlayer.VideoComponentis nowExoPlayer.VideoComponent. - The most used methods of
Player's audio, video, text and metadata components have been added directly toPlayer. - Add
Player.getAvailableCommands,Player.isCommandAvailableandListener.onAvailableCommandsChangedto query which commands that can be executed on the player. - Add a
Player.Listenerinterface to receive all player events. Component listeners andEventListenerhave been deprecated. - Add
Player.getMediaMetadata, which returns a combined and structuredMediaMetadataobject. Changes to metadata are reported toListener.onMediaMetadataChanged. Player.setPlaybackParametersno longer accepts null, usePlaybackParameters.DEFAULTinstead.- Report information about the old and the new playback positions to
Listener.onPositionDiscontinuity. AddDISCONTINUITY_REASON_SKIPandDISCONTINUITY_REASON_REMOVEas discontinuity reasons, and renameDISCONTINUITY_REASON_PERIOD_TRANSITIONtoDISCONTINUITY_REASON_AUTO_TRANSITION. RemoveDISCONTINUITY_REASON_AD_INSERTION, for whichDISCONTINUITY_REASON_AUTO_TRANSITIONis used instead (#6163, #4768). - Deprecate
ExoPlayer.Builder. UseSimpleExoPlayer.Builderinstead. - Move
Player.getRendererCountandPlayer.getRendererTypetoExoPlayer. - Use an empty string instead of the URI if the media ID is not explicitly set with
MediaItem.Builder.setMediaId(String). - Remove
MediaCodecRenderer.configureCodec()and addMediaCodecRenderer.getMediaCodecConfiguration(). The new method is called just before theMediaCodecis created and returns the parameters needed to create and configure theMediaCodecinstance. Applications can overrideMediaCodecRenderer.onCodecInitialized()to be notified after aMediaCodecis initialized, or they can inject a customMediaCodecAdapter.Factoryif they want to control how theMediaCodecis configured. - Promote
AdaptiveTrackSelection.AdaptationCheckpointtopublicvisibility to allow Kotlin subclasses ofAdaptiveTrackSelection.Factory(#8830). - Fix bug when transitions from content to ad periods called
onMediaItemTransitionby mistake. AdsLoader.AdViewProviderandAdsLoader.OverlayInfohave been renamedcom.google.android.exoplayer2.ui.AdViewProviderandcom.google.android.exoplayer2.ui.AdOverlayInforespectively.CaptionStyleCompathas been moved to thecom.google.android.exoplayer2.uipackage.DebugTextViewHelperhas been moved from theuipackage to theutilpackage.
- Move
- RTSP:
- Initial support for RTSP playbacks (#55).
- Downloads and caching:
- Fix
CacheWriterto correctly handle cases where the requestDataSpecextends 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 theallowShortContentparameter has been removed (#7326). - Fix
CacheWriterto correctly handleDataSource.closefailures, for which it cannot be assumed that data was successfully written to the cache.
- Fix
- DRM:
- Prepare DRM sessions (and fetch keys) ahead of the playback position (#4133).
- Only dispatch DRM session acquire and release events once per period when playing content that uses the same encryption keys for both audio & video tracks. Previously, separate acquire and release events were dispatched for each track in each period.
- Include the session state in DRM session-acquired listener methods.
- UI:
- Add
PlayerNotificationManager.Builder, with the ability to specify which group the notification should belong to. - Remove
setUseSensorRotationfromPlayerViewandStyledPlayerView. Instead, cast the view returned bygetVideoSurfaceViewtoSphericalGLSurfaceView, and then callsetUseSensorRotationon theSphericalGLSurfaceViewdirectly.
- Add
- Analytics:
- Add
onAudioCodecErrorandonVideoCodecErrortoAnalyticsListener.
- Add
- Video:
- Add
Player.getVideoSize()to retrieve the current size of the video stream. AddListener.onVideoSizeChanged(VideoSize)and deprecateListener.onVideoSizeChanged(int, int, int, float).
- Add
- Audio:
- Report unexpected audio discontinuities to
AnalyticsListener.onAudioSinkError(#6384). - Allow forcing offload for gapless content even if gapless playback is not supported.
- Allow fall back from DTS-HD to DTS when playing via passthrough.
- Report unexpected audio discontinuities to
- Text:
- Fix overlapping lines when using
SubtitleView.VIEW_TYPE_WEB. - Parse SSA/ASS underline & strikethrough info in
Style:lines (#8435). - Ensure TTML
tts:textAlignis correctly propagated from<p>nodes to child nodes. - Support TTML
ebutts:multiRowAlignattributes.
- Fix overlapping lines when using
- Allow the use of Android platform extractors through MediaParser:
- Supported on API 30+:
- You can use platform extractors for progressive media by passing
MediaParserExtractorAdapter.FACTORYwhen creating aProgressiveMediaSource.Factory. - You can use platform extractors for HLS by passing
MediaParserHlsMediaChunkExtractor.FACTORYwhen creating aHlsMediaSource.Factory. - You can use platform extractors for DASH by passing a
DefaultDashChunkSourcethat usesMediaParserChunkExtractor.FACTORYwhen creating aDashMediaSource.Factory.
- Cast extension:
- Trigger
onMediaItemTransitionevent for all reasons exceptMEDIA_ITEM_TRANSITION_REASON_REPEAT.
- Trigger
- MediaSession extension:
- Remove dependency on
exoplayer-core, relying onlyexoplayer-commoninstead. To achieve this,TimelineQueueEditoruses a newMediaDescriptionConverterinterface, and no longer relies onConcatenatingMediaSource.
- Remove dependency on
- Remove deprecated symbols:
- Remove
ExoPlayerFactory. UseSimpleExoPlayer.Builderinstead. - Remove
Player.DefaultEventListener. UsePlayer.Listenerinstead. - Remove
ExtractorMediaSource. UseProgressiveMediaSourceinstead. - Remove
DefaultMediaSourceEventListener. UseMediaSourceEventListenerinstead. - Remove
DashManifestconstructor. Use the remaining constructor withprogramInformationandserviceDescriptionset tonullinstead. - Remove
CryptoInfo.getFrameworkCryptoInfoV16. UseCryptoInfo.getFrameworkCryptoInfoinstead. - Remove
NotificationUtil.createNotificationChannel(Context, String, int, int). UsecreateNotificationChannel(Context, String, int, int, int)instead. - Remove
PlayerNotificationManager.setNotificationListener. UsePlayerNotificationManager.Builder.setNotificationListenerinstead. - Remove
PlayerNotificationManager.NotificationListeneronNotificationStarted(int, Notification)andonNotificationCancelled(int). UseonNotificationPosted(int, Notification, boolean)andonNotificationCancelled(int, boolean)instead. - Remove
DownloadNotificationUtil. UseDownloadNotificationHelperinstead. - Remove
extension-jobdispatchermodule. Use theextension-workmanagermodule instead.
- Remove
r2.13.3
- Published via the Google Maven repository (i.e., google()) rather than JCenter.
- Core:
- UI:
- DASH:
- Parse
forced_subtitlerole from DASH manifests (#8781).
- Parse
- HLS:
- Fix bug of ignoring
EXT-X-STARTwhen setting the live target offset (#8764). - Fix incorrect application of byte ranges to
EXT-X-MAPtags (#8783). - Fix issue that could cause playback to become stuck if corresponding
EXT-X-DISCONTINUITYtags in different media playlists occur at different positions in time (#8372). - Fix issue that could cause playback of on-demand content to not start in cases where the media playlists referenced by the master playlist have different starting
EXT-X-PROGRAM-DATE-TIMEtags. - Fix container type detection for segments with incorrect file extension or HTTP Content-Type (#8733).
- Fix bug of ignoring
- Extractors:
- Add support for
GContainerandGContainerItemXMP namespace prefixes in JPEG motion photo parsing. - Allow JFIF APP0 marker segment preceding Exif APP1 segment in
JpegExtractor.
- Add support for
- Text:
- Parse SSA/ASS bold & italic info in
Style:lines (#8435). - Don't display subtitles after the end position of the current media period (if known). This ensures sideloaded subtitles respect the end point of
ClippingMediaPeriodand prevents content subtitles from continuing to be displayed over mid-roll ads (#5317, #8456). - Fix CEA-708 priority handling to sort cues in the order defined by the spec (#8704).
- Support TTML
textEmphasisattributes, used for Japanese boutens. - Support TTML
shearattributes.
- Parse SSA/ASS bold & italic info in
- Metadata:
- Ensure that timed metadata near the end of a period is not dropped (#8710).
- Cast extension:
- Fix
onPositionDiscontinuityevent so that it is not triggered with reasonDISCONTINUITY_REASON_PERIOD_TRANSITIONafter a seek to another media item and so that it is not triggered after a timeline change.
- Fix
- IMA extension:
- FFmpeg extension: Fix playback failure when switching to TrueHD tracks during playback (#8616).