2023-05-30
·
144 commits
to main
since this release
Media3: v1.1.0-beta01
June 7, 2023
androidx.media3:media3-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.
- Common Library:
- Add
Player.replaceMediaItem(s)as a shortcut to adding and removing items at the same position (#8046).
- Add
- ExoPlayer:
- Add
FilteringMediaSourcethat allows to filter available track types from aMediaSource. - Add
ExoPlayer.setVideoFrameProcessorFactory()for usingEffectwith a customVideoFrameProcessor.Factoryduring video playback.
- 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).
- Audio Offload:
- Add
AudioSink.getFormatOffloadSupport(Format)that retrieves level of offload support the sink can provide for the format through aDefaultAudioOffloadSupportProvider. It returns the newAudioOffloadSupportthat 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
setAudioOffloadPreferenceinTrackSelectionParameters. 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. - Remove parameter
enableOffloadfromDefaultRenderersFactory.buildAudioSinkmethod signature. - Remove method
DefaultAudioSink.Builder.setOffloadMode. - Remove intdef value
DefaultAudioSink.OffloadMode.OFFLOAD_MODE_ENABLED_GAPLESS_DISABLED.
- Add
- Video:
- Make
MediaCodecVideoRendererreport aVideoSizewith a width and height of 0 when the renderer is disabled.Player.Listener.onVideoSizeChangedis called accordingly whenPlayer.getVideoSize()changes. With this change, ExoPlayer's video size withMediaCodecVideoRendererhas a width and height of 0 whenPlayer.getCurrentTracksdoes 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.MediaButtonReceiverto 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
SimpleCacheconstructors, use a non-deprecated constructor that takes aDatabaseProviderinstead for better performance. - Remove
DefaultBandwidthMeterconstructor, useDefaultBandwidthMeter.Builderinstead. - Remove
DefaultDrmSessionManagerconstructors, useDefaultDrmSessionManager.Builderinstead. - Remove two deprecated
HttpDataSource.InvalidResponseCodeExceptionconstructors, 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.forMediaIteminstead. - Remove deprecated
DownloadServiceconstructor, use a non deprecated constructor that includes the option to provide achannelDescriptionResourceIdparameter. - Remove deprecated String constants for Charsets (
ASCII_NAME,UTF8_NAME,ISO88591_NAME,UTF16_NAMEandUTF16LE_NAME), use Kotlin Charsets from thekotlin.textpackage, thejava.nio.charset.StandardCharsetsor thecom.google.common.base.Charsetsinstead. - Remove deprecated
WorkManagerSchedulerconstructor, use a non deprecated constructor that includes the option to provide aContextparameter instead. - Remove the deprecated methods
createVideoSampleFormat,createAudioSampleFormat,createContainerFormat, andcreateSampleFormat, which were used to instantiate theFormatclass. Instead useFormat.Builderfor creating instances ofFormat. - Remove the deprecated methods
copyWithMaxInputSize,copyWithSubsampleOffsetUs,copyWithLabel,copyWithManifestFormatInfo,copyWithGaplessInfo,copyWithFrameRate,copyWithDrmInitData,copyWithMetadata,copyWithBitrateandcopyWithVideoSize, useFormat.buildUpon()and setter methods instead. - Remove deprecated
ExoPlayer.retry(), useprepare()instead. - Remove deprecated zero-arg
DefaultTrackSelectorconstructor, useDefaultTrackSelector(Context)instead. - Remove deprecated
OfflineLicenseHelperconstructor, useOfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)instead. - Remove deprecated
DownloadManagerconstructor, use the constructor that takes anExecutorinstead. - Remove deprecated
Cueconstructors, useCue.Builderinstead. - Remove deprecated
OfflineLicenseHelperconstructor, useOfflineLicenseHelper(DefaultDrmSessionManager, DrmSessionEventListener.EventDispatcher)instead. - Remove four deprecated
AnalyticsListenermethods:onDecoderEnabled, useonAudioEnabledand/oronVideoEnabledinstead.onDecoderInitialized, useonAudioDecoderInitializedand/oronVideoDecoderInitializedinstead.onDecoderInputFormatChanged, useonAudioInputFormatChangedand/oronVideoInputFormatChangedinstead.onDecoderDisabled, useonAudioDisabledand/oronVideoDisabledinstead.
- Remove the deprecated
Player.Listener.onSeekProcessedandAnalyticsListener.onSeekProcessed, useonPositionDiscontinuitywithDISCONTINUITY_REASON_SEEKinstead. - Remove
ExoPlayer.setHandleWakeLock(boolean), usesetWakeMode(int)instead. - Remove deprecated
DefaultLoadControl.Builder.createDefaultLoadControl(), usebuild()instead.
- Remove two deprecated