Releases: androidx/media
Releases · androidx/media
1.2.0-rc01
- ExoPlayer:
- Add luma and chroma bitdepth to
ColorInfo
#491.
- Add luma and chroma bitdepth to
- Track Selection:
- Add
DefaultTrackSelector.Parameters.allowAudioNonSeamlessAdaptiveness
to explicitly allow or disallow non-seamless adaptation. The default stays at its current behavior oftrue
.
- Add
- Audio:
- Text:
- Remove
ExoplayerCuesDecoder
. Text tracks withsampleMimeType = application/x-media3-cues
are now directly handled byTextRenderer
without needing aSubtitleDecoder
instance.
- Remove
- Session:
- Do not set the queue of the framework session when
COMMAND_GET_TIMELINE
is not available for the media notification controller. With Android Auto as the client controller reading from the framework session, this has the effect that thequeue
button in the UI of Android Auto is not displayed ((#339). - Use
DataSourceBitmapLoader
by default instead ofSimpleBitmapLoader
(#271,#327). - Add
MediaSession.Callback.onMediaButtonEvent(Intent)
that allows apps to override the default media button event handling.
- Do not set the queue of the framework session when
- HLS Extension:
- Refresh the HLS live playlist with an interval calculated from the last load start time rather than the last load completed time (#663).
- DASH Extension:
- Add experimental support for parsing subtitles during extraction. This has better support for merging overlapping subtitles, including resolving flickering when transitioning between subtitle segments. You can enable this using
DashMediaSource.Factory.experimentalParseSubtitlesDuringExtraction()
(#288).
- Add experimental support for parsing subtitles during extraction. This has better support for merging overlapping subtitles, including resolving flickering when transitioning between subtitle segments. You can enable this using
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- Fix bug publishing MIDI decoder artifact to Maven repository. The artifact is renamed to
media3-exoplayer-midi
(#734).
- Fix bug publishing MIDI decoder artifact to Maven repository. The artifact is renamed to
- Remove deprecated symbols:
- Remove deprecated
DownloadNotificationHelper.buildProgressNotification
method, use a non deprecated method that takes anotMetRequirements
parameter instead.
- Remove deprecated
1.2.0-beta01
- Audio:
- Add
onAudioTrackInitialized
andonAudioTrackReleased
callbacks toAnalyticsListener
,AudioRendererEventListener
andAudioSink.Listener
.
- Add
- Metadata:
MetadataDecoder.decode
will no longer be called for "decode-only" samples as the implementation must return null anyway.
- Session:
- Add session demo module for Automotive OS and enable session demo for Android Auto.
- DASH Extension:
- Allow multiple of the same DASH identifier in segment template url.
- RTSP Extension:
- Use RTSP Setup Response timeout value in time interval of sending keep-alive RTSP Options requests (#662).
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- Add
DecoderOutputBuffer.shouldBeSkipped
to directly mark output buffers that don't need to be presented. This is preferred overC.BUFFER_FLAG_DECODE_ONLY
that will be deprecated. - Add
Decoder.setOutputStartTimeUs
andSimpleDecoder.isAtLeastOutputStartTimeUs
to allow decoders to drop decode-only samples before the start time. This should be preferred toBuffer.isDecodeOnly
that will be deprecated.
- Add
1.2.0-alpha02
- Common Library:
- Upgrade
androidx.annotation:annotation-experimental
to1.3.1
. This also introduces a transitive dependency on the Kotlin standard library frommedia3-common
. Apps can downgrade to remove this dependency if they want. Fixes https://issuetracker.google.com/251172715. - Move
ExoPlayer.setAudioAttributes
to thePlayer
interface.
- Upgrade
- ExoPlayer:
- Add additional fields to Common Media Client Data (CMCD) logging: next object request (
nor
) and next range request (nrr
)(#8699). - Add functionality to transmit Common Media Client Data (CMCD) data using query parameters (#553).
- Fix
ConcurrentModificationException
inExperimentalBandwidthMeter
(#612). - Add
MediaPeriodId
parameter toCompositeMediaSource.getMediaTimeForChildMediaTime
. - Support
ClippingMediaSource
(and other sources with period/window time offsets) inConcatenatingMediaSource2
(#11226). - Change
BaseRenderer.onStreamChanged()
to also receive aMediaPeriodId
argument.
- Add additional fields to Common Media Client Data (CMCD) logging: next object request (
- Transformer:
- Changed
frameRate
anddurationUs
parameters ofSampleConsumer.queueInputBitmap
toTimestampIterator
.
- Changed
- Extractors:
- Add
BmpExtractor
. - Add
WebpExtractor
. - Add
HeifExtractor
. - Add QuickTime classic
support toMp4Extractor
.
- Add
- Audio:
- Add support for Opus gapless metadata during offload playback.
- Allow renderer recovery by disabling offload if failed at first write (#627).
- Enable Offload Scheduling by default for audio-only offloaded playback.
- Delete
ExoPlayer.experimentalSetOffloadSchedulingEnabled
andAudioOffloadListener.onExperimentalOffloadSchedulingEnabledChanged
. - Renamed
onExperimentalSleepingForOffloadChanged
asonSleepingForOffloadChanged
andonExperimentalOffloadedPlayback
asonOffloadedPlayback
. - Move audio offload mode related
TrackSelectionParameters
interfaces
and definitions to an innerAudioOffloadPreferences
class.
- Effect:
- Changed
frameRate
anddurationUs
parameters ofVideoFrameProcessor.queueInputBitmap
toTimestampIterator
.
- Changed
- IMA extension:
- Fix bug where a multi-period DASH live stream that is not the first item in a playlist can throw an exception (#571).
- Release StreamManager before calling
AdsLoader.destroy()
- Bump IMA SDK version to 3.31.0.
- Session:
- Set the notifications foreground service behavior to
FOREGROUND_SERVICE_IMMEDIATE
inDefaultMediaNotificationProvider
(#167). - Use only
android.media.session.MediaSession.setMediaButtonBroadcastReceiver()
above API 31 to avoid problems with deprecated API on Samsung devices (#167). - Use the media notification controller as proxy to set available commands and custom layout used to populate the notification and the platform session.
- Convert media button events that are received by
MediaSessionService.onStartCommand()
within Media3 instead of routing them to the platform session and back to Media3. With this, the caller controller is always the media notification controller and apps can easily recognize calls coming from the notification in the same way on all supported API levels. - Fix bug where
MediaController.getCurrentPosition()
is not advancing when connected to a legacyMediaSessionCompat
. - Add
MediaLibrarySession.getSubscribedControllers(mediaId)
for convenience. - Override
MediaLibrarySession.Callback.onSubscribe()
to assert the availability of the parent Id for which the controller subscribes. If successful, the subscription is accepted andnotifyChildrenChanged()
is called immediately to inform the browser (#561).
- Set the notifications foreground service behavior to
- RTSP Extension:
- Leanback extension:
- Fix bug where disabling a surface can cause an
ArithmeticException
in Leanback code (#617).
- Fix bug where disabling a surface can cause an
1.2.0-alpha01
This release includes the following changes since 1.1.1 release:
- Common Library:
- Add a
@Nullable Throwable
parameter to the methods in theLog.Logger
interface. Themessage
parameter to these methods no longer contains any information about theThrowable
passed to theLog.{d,i,w,e}()
methods, so implementations will need to manually append this information if desired (possibly usingLogger.appendThrowableString(String, Throwable)
). - Fix Kotlin compatibility issue where nullable generic type parameters and nullable array element types are not detected as nullable. Examples are
TrackSelectorResult
andSimpleDecoder
method parameters (#6792). - Change default UI and notification behavior in
Util.shouldShowPlayButton
to show a "play" button while playback is temporarily suppressed (e.g. due to transient audio focus loss). The legacy behavior can be maintained by usingPlayerView.setShowPlayButtonIfPlaybackIsSuppressed(false)
orMediaSession.Builder.setShowPlayButtonIfPlaybackIsSuppressed(false)
(#11213).
- Add a
- ExoPlayer:
- Fix seeking issues in AC4 streams caused by not identifying decode-only samples correctly (#11000).
- Add suppression of playback on unsuitable audio output devices (e.g. the built-in speaker on Wear OS devices) when this feature is enabled via
ExoPlayer.Builder.setSuppressPlaybackOnUnsuitableOutput
. The playback suppression reason will be updated asPlayer.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT
if playback is attempted when no suitable audio outputs are available, or if all suitable outputs are disconnected during playback. The suppression reason will be removed when a suitable output is connected. - Add
MediaSource.canUpdateMediaItem
andMediaSource.updateMediaItem
to acceptMediaItem
updates after creation viaPlayer.replaceMediaItem(s)
. - Allow
MediaItem
updates for allMediaSource
classes provided by the library viaPlayer.replaceMediaItem(s)
((#33),(#9978)). - Rename
MimeTypes.TEXT_EXOPLAYER_CUES
toMimeTypes.APPLICATION_MEDIA3_CUES
. - Add
PngExtractor
that sends and reads a whole PNG file into theTrackOutput
as one sample. - Enhance
SequenceableLoader.continueLoading(long)
method in theSequenceableLoader
interface toSequenceableLoader.continueLoading(LoadingInfo loadingInfo)
.LoadingInfo
contains additional parameters, includingplaybackSpeed
andlastRebufferRealtimeMs
in addition to the existingplaybackPositionUs
. - Enhance
ChunkSource.getNextChunk(long, long, List, ChunkHolder)
method in theChunkSource
interface toChunkSource.getNextChunk(LoadingInfo, long, List, ChunkHolder)
. - Add additional fields to Common Media Client Data (CMCD) logging: buffer starvation (
bs
), deadline (dl
), playback rate (pr
) and startup (su
) (#8699).
- Transformer:
- Parse EXIF rotation data for image inputs.
- Remove
TransformationRequest.HdrMode
annotation type and its associated constants. UseComposition.HdrMode
and its associated constants instead. - Simplify the
OverlaySettings
to fix rotation issues.
- Extractors:
- MPEG-TS: Ensure the last frame is rendered by passing the last access unit of a stream to the sample queue (#7909).
- Fix typo when determining
rotationDegrees
. ChangedprojectionPosePitch
toprojectionPoseRoll
(#461). - Remove the assumption that
Extractor
instances can be directly inspected withinstanceof
. If you want runtime access to the implementation details of anExtractor
you must first callExtractor.getUnderlyingInstance
.
- Audio:
- Add support for 24/32-bit big-endian PCM in MP4 and Matroska, and parse PCM encoding for
lpcm
in MP4. - Add support for extracting Vorbis audio in MP4.
- Add support for 24/32-bit big-endian PCM in MP4 and Matroska, and parse PCM encoding for
- Audio Offload:
- Add
AudioSink.getFormatOffloadSupport(Format)
that retrieves level of offload support the sink can provide for the format through aDefaultAudioOffloadSupportProvider
. It returns the newAudioOffloadSupport
that containsisFormatSupported
,isGaplessSupported
, andisSpeedChangeSupported
. - Add
AudioSink.setOffloadMode()
through which the offload configuration on the audio sink is configured. Default isAudioSink.OFFLOAD_MODE_DISABLED
. - Offload can be enabled through
setAudioOffloadPreference
inTrackSelectionParameters
. If the set preference is to enable, the device supports offload for the format, and the track selection is a single audio track, then audio offload will be enabled. - If
audioOffloadModePreference
is set toAUDIO_OFFLOAD_MODE_PREFERENCE_REQUIRED
, then theDefaultTrackSelector
will only select an audio track and only if that track's format is supported in offload. If no audio track is supported in offload, then no track will be selected. - Disabling gapless support for offload when pre-API level 33 due to playback position issue after track transition.
- Remove parameter
enableOffload
fromDefaultRenderersFactory.buildAudioSink
method signature. - Remove method
DefaultAudioSink.Builder.setOffloadMode
. - Remove intdef value
DefaultAudioSink.OffloadMode.OFFLOAD_MODE_ENABLED_GAPLESS_DISABLED
.
- Add
- Video:
- Allow
MediaCodecVideoRenderer
to use a customVideoFrameProcessor.Factory
. - Fix bug where the first frame couldn't be rendered if the audio stream starts with negative timestamps (#291).
- Allow
- Effect:
- Add
VideoFrameProcessor.queueInputBitmap(Bitmap, Iterator<Long>)
queuing bitmap input by timestamp.
- Add
- UI:
- Add a
Player.Listener
implementation for Wear OS devices that handles playback suppression due toPlayer.PLAYBACK_SUPPRESSION_REASON_UNSUITABLE_AUDIO_OUTPUT
by launching a system dialog to allow a user to connect a suitable audio output (e.g. bluetooth headphones). The listener will auto-resume playback if a suitable device is connected within a configurable timeout (default is 5 minutes).
- Add a
- Downloads:
- Declare "data sync" foreground service type for
DownloadService
for Android 14 compatibility. When using this service, the app also needs to adddataSync
asforegroundServiceType
in the manifest and add theFOREGROUND_SERVICE_DATA_SYNC
permission (#11239).
- Declare "data sync" foreground service type for
- MIDI extension:
- Release the MIDI decoder module, which provides support for playback of standard MIDI files using the Jsyn library to synthesize audio.
- Test Utilities:
- Make
TestExoPlayerBuilder
andFakeClock
compatible with Espresso UI tests and Compose UI tests. This fixes a bug where playback advances non-deterministically during Espresso or Compose view interactions.
- Make
- Remove deprecated symbols:
- Remove
TransformationRequest.Builder.setEnableRequestSdrToneMapping(boolean)
andTransformationRequest.Builder.experimental_setEnableHdrEditing(boolean)
. UseComposition.Builder.setHdrMode(int)
and pass theComposition
toTransformer.start(Composition, String)
instead.
- Remove
1.1.1
This release corresponds to the ExoPlayer 2.19.1 release.
This release includes the following changes since the 1.1.0 release:
- Common Library:
- Remove accidentally added
multidex
dependency from all modules (#499).
- Remove accidentally added
- ExoPlayer:
- Fix issue in
PlaybackStatsListener
where spuriousPlaybackStats
are created after the playlist is cleared. - Add additional fields to Common Media Client Data (CMCD) logging: streaming format (sf), stream type (st), version (v), top birate (tb), object duration (d), measured throughput (mtp) and object type (ot) (#8699).
- Fix issue in
- Audio:
- Fix a bug where
Player.getState()
never transitioned toSTATE_ENDED
when playing very short files (#538).
- Fix a bug where
- Audio Offload:
- Prepend Ogg ID Header and Comment Header Pages to bitstream for offloaded Opus playback in accordance with RFC 7845.
- Video:
- H.265/HEVC: Fix parsing SPS short and long term reference picture info.
- Text:
- CEA-608: Change cue truncation logic to only consider visible text. Previously indent and tab offset were included when limiting the cue length to 32 characters (which was technically correct by the spec) (#11019).
- IMA extension:
- Bump IMA SDK version to 3.30.3.
- Session:
- Add custom layout to the state of the controller and provide a getter to access it. When the custom layout changes,
MediaController.Listener.onCustomLayoutChanged
is called. Apps that want to send different custom layouts to different Media3 controller can do this inMediaSession.Callback.onConnect
by using anAcceptedResultBuilder
to make sure the custom layout is available to the controller when connection completes. - Fix cases where
MediaLibraryServiceLegacyStub
sent an error to aResult
that didn't support this which produced anUnsupportedOperationException
(#78). - Fix the way
PlayerWrapper
creates aVolumeProviderCompat
by determiningvolumeControlType
through both legacy commands (COMMAND_ADJUST_DEVICE_VOLUME
andCOMMAND_SET_DEVICE_VOLUME
) and new commands (COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS
andCOMMAND_SET_DEVICE_VOLUME_WITH_FLAGS
) (#554).
- Add custom layout to the state of the controller and provide a getter to access it. When the custom layout changes,
1.1.0
This release corresponds to the ExoPlayer 2.19.0 release.
This release contains the following changes since the 1.0.2 release:
- Common Library:
- Add suppression reason for unsuitable audio route and play when ready change reason for suppressed too long. (#15).
- Add commands to Player:
COMMAND_GET_METADATA
COMMAND_SET_PLAYLIST_METADATA
COMMAND_SET_DEVICE_VOLUME_WITH_FLAGS
COMMAND_ADJUST_DEVICE_VOLUME_WITH_FLAGS
- Add overloaded methods to Player which allow users to specify volume flags:
void setDeviceVolume(int, int)
void increaseDeviceVolume(int)
void decreaseDeviceVolume(int)
void setDeviceMuted(boolean, int)
- Add
Builder
forDeviceInfo
and deprecate existing constructor. - Add
DeviceInfo.routingControllerId
to specify the routing controller ID for remote playbacks. - Add
Player.replaceMediaItem(s)
as a shortcut to adding and removing items at the same position (#8046).
- ExoPlayer:
- Allow ExoPlayer to have control of device volume methods only if explicitly opted in. Use
ExoPlayer.Builder.setDeviceVolumeControlEnabled
to have access to:getDeviceVolume()
isDeviceMuted()
setDeviceVolume(int)
andsetDeviceVolume(int, int)
increaseDeviceVolume(int)
andincreaseDeviceVolume(int, int)
decreaseDeviceVolume(int)
anddecreaseDeviceVolume(int, int)
- Add
FilteringMediaSource
that allows to filter available track types from aMediaSource
. - Add support for including Common Media Client Data (CMCD) in the outgoing requests of adaptive streaming formats DASH, HLS, and SmoothStreaming. The following fields,
br
,bl
,cid
,rtp
, andsid
, have been incorporated (#8699). API structure and API methods:- CMCD logging is disabled by default, use
MediaSource.Factory.setCmcdConfigurationFactory(CmcdConfiguration.Factory cmcdConfigurationFactory)
to enable it. - All keys are enabled by default, override
CmcdConfiguration.RequestConfig.isKeyAllowed(String key)
to filter out which keys are logged. - Override
CmcdConfiguration.RequestConfig.getCustomData()
to enable custom key logging.
- CMCD logging is disabled by default, use
- Add additional action to manifest of main demo to make it easier to start the demo app with a custom
*.exolist.json
file (#439). - Add
ExoPlayer.setVideoEffects()
for usingEffect
during video playback. - Update
SampleQueue
to storesourceId
as along
rather than anint
. This changes the signatures of public methodsSampleQueue.sourceId
andSampleQueue.peekSourceId
. - Add parameters to
LoadControl
methodsshouldStartPlayback
andonTracksSelected
that allow associating these methods with the relevantMediaPeriod
. - Change signature of
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. - Deprecate
EventDispatcher.withParameters(int windowIndex, @Nullable MediaPeriodId mediaPeriodId, long mediaTimeOffsetMs)
andBaseMediaSource.createEventDispatcher(..., long mediaTimeOffsetMs)
. The variant of the methods without themediaTimeOffsetUs
can be called instead. Note that even for the deprecated variants, the offset is not anymore added tostartTimeUs
andendTimeUs
of theMediaLoadData
objects that are dispatched by the dispatcher. - Rename
ExoTrackSelection.blacklist
toexcludeTrack
andisBlacklisted
toisTrackExcluded
. - Fix inconsistent behavior between
ExoPlayer.setMediaItem(s)
andaddMediaItem(s)
when called on an empty playlist.
- Allow ExoPlayer to have control of device volume methods only if explicitly opted in. Use
- Transformer:
- Remove
Transformer.Builder.setMediaSourceFactory(MediaSource.Factory)
. UseExoPlayerAssetLoader.Factory(MediaSource.Factory)
andTransformer.Builder.setAssetLoaderFactory(AssetLoader.Factory)
instead. - Remove
Transformer.startTransformation(MediaItem, ParcelFileDescriptor)
. - Fix a bug where transformation could get stuck (leading to muxer timeout) if the end of the video stream was signaled at the moment when an input frame was pending processing.
- Query codecs via
MediaCodecList
instead of usingfindDecoder/EncoderForFormat
utilities, to expand support. - Remove B-frame configuration in
DefaultEncoderFactory
because it doesn't work on some devices.
- Remove
- Track selection:
- Add
DefaultTrackSelector.Parameters.allowInvalidateSelectionsForRendererCapabilitiesChange
which is disabled by default. When enabled, theDefaultTrackSelector
will trigger a new track selection when the renderer capabilities changed.
- Add
- Extractors:
- Audio:
- Fix bug where some playbacks fail when tunneling is enabled and
AudioProcessors
are active, e.g. for gapless trimming (#10847). - Encapsulate Opus frames in Ogg packets in direct playbacks (offload).
- Extrapolate current position during sleep with offload scheduling.
- Add
Renderer.release()
andAudioSink.release()
for releasing the resources at the end of player's lifecycle. - Listen to audio capabilities changes in
DefaultAudioSink
. Add a required parametercontext
in the constructor ofDefaultAudioSink
, with which theDefaultAudioSink
will register as the listener to theAudioCapabilitiesReceiver
and update itsaudioCapabilities
property when informed with a capabilities change. - Propagate audio capabilities changes via a new event
onAudioCapabilitiesChanged
inAudioSink.Listener
interface, and a new interfaceRendererCapabilities.Listener
which triggersonRendererCapabilitiesChanged
events. - Add
ChannelMixingAudioProcessor
for applying scaling/mixing to audio channels. - Add new int value
DISCARD_REASON_AUDIO_BYPASS_POSSIBLE
toDecoderDiscardReasons
to discard audio decoder when bypass mode is possible after audio capabilities change. - Add direct playback support for DTS Express and DTS:X (#335).
- Fix bug where some playbacks fail when tunneling is enabled and
- Video:
- Make
MediaCodecVideoRenderer
report aVideoSize
with a width and height of 0 when the renderer is disabled.Player.Listener.onVideoSizeChanged
is called accordingly whenPlayer.getVideoSize()
changes. With this change, ExoPlayer's video size withMediaCodecVideoRenderer
has a width and height of 0 whenPlayer.getCurrentTracks
does not support video, or the size of the supported video track is not yet determined.
- Make
- DRM:
- Reduce the visibility of several internal-only methods on
DefaultDrmSession
that aren't expected to be called from outside the DRM package:void onMediaDrmEvent(int)
void provision()
void onProvisionCompleted()
onProvisionError(Exception, boolean)
- Reduce the visibility of several internal-only methods on
- Muxer:
- Add a new muxer library which can be used to create an MP4 container file.
- IMqA extension:
- Enable multi-period live DASH streams for DAI. Please note that the current implementation does not yet support seeking in live streams (#10912).
- Fix a bug where a new ad group is inserted in live streams because the calculated content position in consecutive timelines varies slightly.
- Session:
- Add helper method
MediaSession.getControllerForCurrentRequest
to obtain information about the controller that is currently calling aPlayer
method. - Add
androidx.media3.session.MediaButtonReceiver
to enable apps to implement playback resumption with media button events sent by, for example, a Bluetooth headset (#167). - Add default implementation to
MediaSession.Callback.onAddMediaItems
to allow requestedMediaItems
to be passed ontoPlayer
if they haveLocalConfiguration
(e.g. URI) (#282). - Add "seek to previous" and "seek to next" command buttons on compact media notification view by default for Android 12 and below (#410).
- Add helper method
- UI:
- Add Util methods
shouldShowPlayButton
andhandlePlayPauseButtonAction
to write custom UI elements with a play/pause button.
- Add Util methods
- RTSP Extension:
- DASH Extension:
- Remove the media time offset from
MediaLoadData.startTimeMs
andMediaLoadData.endTimeMs
for multi period DASH streams. - Fix a bug where re-preparing a multi-period live Dash media source produced a
IndexOutOfBoundsException
(#10838).
- Remove the media time offset from
- HLS Extension:
- Add
HlsMediaSource.Factory.setTimestampAdjusterInitializationTimeoutMs(long)
to set a timeout for the loading thread to wait for theTimestampAdjuster
to initialize. If the initialization doesn't complete before the timeout, aPlaybackException
is thro...
- Add
1.1.0-rc01
This release includes the following changes since 1.1.0-beta01:
- ExoPlayer:
- Add support for including Common Media Client Data (CMCD) in the outgoing requests of adaptive streaming formats DASH, HLS, and SmoothStreaming. The following fields,
br
,bl
,cid
,rtp
, andsid
, have been incorporated (#8699). API structure and API methods:- CMCD logging is disabled by default, use
MediaSource.Factory.setCmcdConfigurationFactory(CmcdConfiguration.Factory cmcdConfigurationFactory)
to enable it. - All keys are enabled by default, override
CmcdConfiguration.RequestConfig.isKeyAllowed(String key)
to filter out which keys are logged. - Override
CmcdConfiguration.RequestConfig.getCustomData()
to enable custom key logging.
- CMCD logging is disabled by default, use
- Add additional action to manifest of main demo to make it easier to start the demo app with a custom
*.exolist.json
file (#439).
- Add support for including Common Media Client Data (CMCD) in the outgoing requests of adaptive streaming formats DASH, HLS, and SmoothStreaming. The following fields,
- Extractors:
- FMP4: Fix issue where
TimestampAdjuster
initializes a wrong timestamp offset with metadata sample time from emsg atom (#356).
- FMP4: Fix issue where
1.1.0-beta01
- Common Library:
- Add
Player.replaceMediaItem(s)
as a shortcut to adding and removing items at the same position (#8046).
- Add
- ExoPlayer:
- Add
FilteringMediaSource
that allows to filter available track types from aMediaSource
. - Allow ExoPlayer to have control of device volume methods only if
explicitly opted in. Use
ExoPlayer.Builder.setDeviceVolumeControlEnabled
to have access to:getDeviceVolume()
isDeviceMuted()
setDeviceVolume(int)
andsetDeviceVolume(int, int)
increaseDeviceVolume(int)
andincreaseDeviceVolume(int, int)
decreaseDeviceVolume(int)
anddecreaseDeviceVolume(int, int)
- Add
- Extractors:
- Ogg: Fix bug when seeking in files with a long duration (#391).
- Audio:
- Add direct playback support for DTS Express and DTS:X (#335).
- Video:
- Make
MediaCodecVideoRenderer
report aVideoSize
with a width and height of 0 when the renderer is disabled.Player.Listener.onVideoSizeChanged
is called accordingly whenPlayer.getVideoSize()
changes. With this change, ExoPlayer's video size withMediaCodecVideoRenderer
has a width and height of 0 whenPlayer.getCurrentTracks
does not support video, or the size of the supported video track is not yet determined.
- Make
- IMA extension:
- Enable multi-period live DASH streams for DAI. Please note that the current implementation does not yet support seeking in live streams (#10912).
- Session:
- Add
androidx.media3.session.MediaButtonReceiver
to enable apps to implement playback resumption with media button events sent by, for example, a Bluetooth headset (#167).
- Add
- RTSP Extension:
- Use base Uri for relative path resolution from the RTSP session if present in DESCRIBE response header (#11160).
- Remove deprecated symbols:
- Remove two deprecated
SimpleCache
constructors, use a non-deprecated constructor that takes aDatabaseProvider
instead for better performance. - Remove
DefaultBandwidthMeter
constructor, useDefaultBandwidthMeter.Builder
instead. - Remove
DefaultDrmSessionManager
constructors, useDefaultDrmSessionManager.Builder
instead. - Remove two deprecated
HttpDataSource.InvalidResponseCodeException
constructors, use a non-deprecated constructor that accepts additional fields(cause
,responseBody
) to enhance error logging. - Remove
DownloadHelper.forProgressive
,DownloadHelper.forHls
,DownloadHelper.forDash
, andDownloadHelper.forSmoothStreaming
, useDownloadHelper.forMediaItem
instead. - Remove deprecated
DownloadService
constructor, use a non deprecated constructor that includes the option to provide achannelDescriptionResourceId
parameter. - Remove deprecated String constants for Charsets (
ASCII_NAME
,UTF8_NAME
,ISO88591_NAME
,UTF16_NAME
andUTF16LE_NAME
), use Kotlin Charsets from thekotlin.text
package, thejava.nio.charset.StandardCharsets
or thecom.google.common.base.Charsets
instead. - Remove deprecated
WorkManagerScheduler
constructor, use a non deprecated constructor that includes the option to provide aContext
parameter instead. - Remove the deprecated methods
createVideoSampleFormat
,createAudioSampleFormat
,createContainerFormat
, andcreateSampleFormat
, which were used to instantiate theFormat
class. Instead useFormat.Builder
for creating instances ofFormat
. - Remove the deprecated methods
copyWithMaxInputSize
,copyWithSubsampleOffsetUs
,copyWithLabel
,copyWithManifestFormatInfo
,copyWithGaplessInfo
,copyWithFrameRate
,copyWithDrmInitData
,copyWithMetadata
,copyWithBitrate
andcopyWithVideoSize
, useFormat.buildUpon()
and setter methods instead. - Remove deprecated
ExoPlayer.retry()
, useprepare()
instead. - Remove deprecated zero-arg
DefaultTrackSelector
constructor, useDefaultTrackSelector(Context)
instead. - Remove deprecated
OfflineLicenseHelper
constructor, useOfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)
instead. - Remove deprecated
DownloadManager
constructor, use the constructor that takes anExecutor
instead. - Remove deprecated
Cue
constructors, useCue.Builder
instead. - Remove deprecated
OfflineLicenseHelper
constructor, useOfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)
instead. - Remove four deprecated
AnalyticsListener
methods:onDecoderEnabled
, useonAudioEnabled
and/oronVideoEnabled
instead.onDecoderInitialized
, useonAudioDecoderInitialized
and/oronVideoDecoderInitialized
instead.onDecoderInputFormatChanged
, useonAudioInputFormatChanged
and/oronVideoInputFormatChanged
instead.onDecoderDisabled
, useonAudioDisabled
and/oronVideoDisabled
instead.
- Remove the deprecated
Player.Listener.onSeekProcessed
andAnalyticsListener.onSeekProcessed
, useonPositionDiscontinuity
withDISCONTINUITY_REASON_SEEK
instead. - Remove
ExoPlayer.setHandleWakeLock(boolean)
, usesetWakeMode(int)
instead. - Remove deprecated
DefaultLoadControl.Builder.createDefaultLoadControl()
, usebuild()
instead.
- Remove two deprecated
1.0.2
This release corresponds to the ExoPlayer 2.18.7 release.
This release contains the following changes since the 1.0.1 release:
- Core library:
- Add
Buffer.isLastSample()
that denotes ifBuffer
contains flagC.BUFFER_FLAG_LAST_SAMPLE
. - Fix issue where last frame may not be rendered if the last sample with frames is dequeued without reading the 'end of stream' sample. (#11079).
- Add
- Extractors:
- Fix parsing of H.265 SPS in MPEG-TS files by re-using the parsing logic already used by RTSP and MP4 extractors (#303).
- Text:
- SSA: Add support for UTF-16 files if they start with a byte order mark (#319).
- Session:
- Fix issue where
MediaController
doesn't update its available commands when connected to a legacyMediaSessionCompat
that updates its actions. - Fix bug that prevented the
MediaLibraryService
from returning null for a call from System UI toCallback.onGetLibraryRoot
withparams.isRecent == true
on API 30 (#355). - Fix memory leak of
MediaSessionService
orMediaLibraryService
(#346). - Fix bug where a combined
Timeline
and position update in aMediaSession
may cause aMediaController
to throw anIllegalStateException
.
- Fix issue where
1.1.0-alpha01
- Core library:
- Add suppression reason for unsuitable audio route and play when ready change reason for suppressed too long. (#15).
- Add
ExoPlayer.setVideoEffects()
for usingEffect
during video playback. - Update
SampleQueue
to storesourceId
as along
rather than anint
. This changes the signatures of public methodsSampleQueue.sourceId
andSampleQueue.peekSourceId
. - Add parameters to
LoadControl
methodsshouldStartPlayback
andonTracksSelected
that allow associating these methods with the relevantMediaPeriod
. - Change signature of
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. - Deprecate
EventDispatcher.withParameters(int windowIndex, @Nullable MediaPeriodId mediaPeriodId, long mediaTimeOffsetMs)
andBaseMediaSource.createEventDispatcher(..., long mediaTimeOffsetMs)
. The variant of the methods without themediaTimeOffsetUs
can be called instead. Note that even for the deprecated variants, the offset is not anymore added tostartTimeUs
andendTimeUs
of theMediaLoadData
objects that are dispatched by the dispatcher. - Rename
ExoTrackSelection.blacklist
toexcludeTrack
andisBlacklisted
toisTrackExcluded
. - Deprecate
Player.COMMAND_GET_MEDIA_ITEMS_METADATA
andCOMMAND_SET_MEDIA_ITEMS_METADATA
. UseCOMMAND_GET_METADATA
andCOMMAND_SET_PLAYLIST_METADATA
instead. - Add
Buffer.isLastSample()
that denotes ifBuffer
contains flagC.BUFFER_FLAG_LAST_SAMPLE
. - Fix issue where last frame may not be rendered if the last sample with frames is dequeued without reading the 'end of stream' sample. (#11079).
- Add
Builder
forDeviceInfo
and deprecate existing constructor. - Add
DeviceInfo.routingControllerId
to specify the routing controller ID for remote playbacks. - Fix inconsistent behavior between
ExoPlayer.setMediaItem(s)
andaddMediaItem(s)
when called on an empty playlist.
- Extractors:
- Fix parsing of H.265 SPS in MPEG-TS files by re-using the parsing logic already used by RTSP and MP4 extractors (#303).
- Session:
- Deprecate 4 volume-controlling methods in
Player
and add overloaded methods which allow users to specify volume flags:void setDeviceVolume(int, int)
void increaseDeviceVolume(int)
void decreaseDeviceVolume(int)
void setDeviceMuted(boolean, int)
- Fix issue where
MediaController
doesn't update its available commands when connected to a legacyMediaSessionCompat
that updates its actions. - Add helper method
MediaSession.getControllerForCurrentRequest
to obtain information about the controller that is currently calling aPlayer
method. - Fix bug that prevented the
MediaLibraryService
from returning null for a call from System UI toCallback.onGetLibraryRoot
withparams.isRecent == true
on API 30 (#355). - Fix memory leak of
MediaSessionService
orMediaLibraryService
(#346).
- Deprecate 4 volume-controlling methods in
- UI:
- Add Util methods
shouldShowPlayButton
andhandlePlayPauseButtonAction
to write custom UI elements with a play/pause button.
- Add Util methods
- Track selection:
- Add
DefaultTrackSelector.Parameters.allowInvalidateSelectionsForRendererCapabilitiesChange
which is disabled by default. When enabled, theDefaultTrackSelector
will trigger a new track selection when the renderer capabilities changed.
- Add
- Audio:
- Fix bug where some playbacks fail when tunneling is enabled and
AudioProcessors
are active, e.g. for gapless trimming (#10847). - Encapsulate Opus frames in Ogg packets in direct playbacks (offload).
- Extrapolate current position during sleep with offload scheduling.
- Add
Renderer.release()
andAudioSink.release()
for releasing the resources at the end of player's lifecycle. - Listen to audio capabilities changes in
DefaultAudioSink
. Add a required parametercontext
in the constructor ofDefaultAudioSink
, with which theDefaultAudioSink
will register as the listener to theAudioCapabilitiesReceiver
and update itsaudioCapabilities
property when informed with a capabilities change. - Propagate audio capabilities changes via a new event
onAudioCapabilitiesChanged
inAudioSink.Listener
interface, and a new interfaceRendererCapabilities.Listener
which triggersonRendererCapabilitiesChanged
events. - Add
ChannelMixingAudioProcessor
for applying scaling/mixing to audio channels. - Add new int value
DISCARD_REASON_AUDIO_BYPASS_POSSIBLE
toDecoderDiscardReasons
to discard audio decoder when bypass mode is possible after audio capabilities change.
- Fix bug where some playbacks fail when tunneling is enabled and
- Metadata:
- Deprecate
MediaMetadata.folderType
in favor ofisBrowsable
andmediaType
.
- Deprecate
- DRM:
- Reduce the visibility of several internal-only methods on
DefaultDrmSession
that aren't expected to be called from outside the DRM package:void onMediaDrmEvent(int)
void provision()
void onProvisionCompleted()
onProvisionError(Exception, boolean)
- Reduce the visibility of several internal-only methods on
- Transformer:
- Remove
Transformer.Builder.setMediaSourceFactory(MediaSource.Factory)
. UseExoPlayerAssetLoader.Factory(MediaSource.Factory)
andTransformer.Builder.setAssetLoaderFactory(AssetLoader.Factory)
instead. - Remove
Transformer.startTransformation(MediaItem, ParcelFileDescriptor)
. - Fix a bug where transformation could get stuck (leading to muxer timeout) if the end of the video stream was signaled at the moment when an input frame was pending processing.
- Query codecs via
MediaCodecList
instead of usingfindDecoder/EncoderForFormat
utilities, to expand support. - Remove B-frame configuration in
DefaultEncoderFactory
because it doesn't work on some devices.
- Remove
- Muxer:
- Add a new muxer library which can be used to create an MP4 container file.
- DASH:
- Remove the media time offset from
MediaLoadData.startTimeMs
andMediaLoadData.endTimeMs
for multi period DASH streams.
- Remove the media time offset from
- RTSP:
- For MPEG4-LATM, use default profile-level-id value if absent in Describe Response SDP message (#302).
- IMA DAI extension:
- Text:
- Fix a bug where a new ad group is inserted in live streams because the calculated content position in consecutive timelines varies slightly.
- SSA: Add support for UTF-16 files if they start with a byte order mark (#319).
- Test Utilities:
- Check for URI scheme case insensitivity in
DataSourceContractTest
.
- Check for URI scheme case insensitivity in
- Remove deprecated symbols:
- Remove
DefaultAudioSink
constructors, useDefaultAudioSink.Builder
instead. - Remove
HlsMasterPlaylist
, useHlsMultivariantPlaylist
instead. - Remove
Player.stop(boolean)
. UsePlayer.stop()
andPlayer.clearMediaItems()
(ifreset
istrue
) instead.
- Remove