December 20, 2024
androidx.media3:media3-*:1.6.0-alpha01
is released. Version 1.6.0-alpha01 contains these commits.
Format.toBundle(boolean excludeMetadata)
method, use Format.toBundle()
instead.AudioManagerCompat
and AudioFocusRequestCompat
to replace the equivalent classes in androidx.media
.TrackSelectionParameters.Builder.setPreferredVideoLanguage(s)
.selectedAudioLanguage
parameter to DefaultTrackSelector.selectVideoTrack()
method.retryCount
parameter to MediaSourceEventListener.onLoadStarted
and corresponding MediaSourceEventListener.EventDispatcher
methods.bufferForPlaybackMs
and bufferForPlaybackAfterRebufferMs
in DefaultLoadControl
to 1000 and 2000 ms respectively.MediaExtractorCompat
, a new class that provides equivalent features to platform MediaExtractor
.BasePreloadManager.Listener
to a top-level PreloadManagerListener
.RenderersFactory.createSecondaryRenderer
can be implemented to provide secondary renderers for pre-warming. Pre-warming enables quicker media item transitions during playback.CmcdData
for manifest requests in adaptive streaming formats DASH, HLS, and SmoothStreaming (#1951).MediaCodecInfo
of the codec that will be initialized in MediaCodecRenderer.onReadyToInitializeCodec
(#1963).AdsMediaSource
to allow the AdPlaybackStates
to grow by appending ad groups. Invalid modifications are detected and throw an exception.VideoFrameProcessor.registerInputStream
and VideoFrameProcessor.Listener.onInputStreamRegistered
to use Format
.DefaultEncoderFactory
.onAudioPositionAdvancing
to be called when playback resumes (previously it was called when playback was paused).MediaCodecVideoRenderer
such that when without a Surface
, the renderer skips just-early frames only if the VideoFrameReleaseControl.getFrameReleaseAction
is not FRAME_RELEASE_TRY_AGAIN_LATER
.MediaItem.Builder.setSubtitleConfigurations
, and instead only load one if it is selected by track selection (#1721).OverlaySettings
into StaticOverlaySettings
. OverlaySettings
can be subclassed to allow dynamic overlay settings.MuxerException
out of Muxer
interface to avoid a very long fully qualified name.PlayerSurface
Composable to media3-ui-compose
module.PlayPauseButtonState
, NextButtonState
, PreviousButtonState
, RepeatButtonState
, ShuffleButtonState
classes and the corresponding rememberPlayPauseButtonState
, rememberNextButtonState
, rememberPreviousButtonState
, rememberRepeatButtonState
, rememberShuffleButtonState
composables to media3-ui-compose
module.HlsInterstitialsAdsLoader
. The ads loader reads the HLS interstitials of an HLS media playlist and maps them to the AdPlaybackState
that is passed to the AdsMediaSource
. This initial version only supports HLS VOD streams with X-ASSET-URI
attributes.HlsInterstitialsAdsLoader.AdsMediaSourceFactory
. Apps can use it to create AdsMediaSource
instances that use an HlsInterstitialsAdsLoader
in a convenient and safe way.MinimalControls
(PlayPauseButton
, NextButton
, PreviousButton
) and ExtraControls
(RepeatButton
, ShuffleButton
) Composable UI elements to demo-compose
utilizing PlayPauseButtonState
, NextButtonState
, PreviousButtonState
, RepeatButtonState
, ShuffleButtonState
.AudioMixer.create()
method. Use DefaultAudioMixer.Factory().create()
instead.Transformer.Builder
methods:
setTransformationRequest()
, use setAudioMimeType()
, setVideoMimeType()
, and setHdrMode()
instead.setAudioProcessors()
, set the audio processor in an EditedMediaItem.Builder.setEffects()
, and pass it to Transformer.start()
instead.setVideoEffects()
, set video effect in an EditedMediaItem.Builder.setEffects()
, and pass it to Transformer.start()
instead.setRemoveAudio()
, use EditedMediaItem.Builder.setRemoveAudio()
to remove the audio from the EditedMediaItem
passed to Transformer.start()
instead.setRemoveVideo()
, use EditedMediaItem.Builder.setRemoveVideo()
to remove the video from the EditedMediaItem
passed to Transformer.start()
instead.setFlattenForSlowMotion()
, use EditedMediaItem.Builder.setFlattenForSlowMotion()
to flatten the EditedMediaItem
passed to Transformer.start()
instead.setListener()
, use addListener()
, removeListener()
or removeAllListeners()
instead.Transformer.Listener
methods:
onTransformationCompleted(MediaItem)
, use onCompleted(Composition, ExportResult)
instead.onTransformationCompleted(MediaItem, TransformationResult)
, use onCompleted(Composition, ExportResult)
instead.onTransformationError(MediaItem, Exception)
, use onError(Composition, ExportResult, ExportException)
instead.onTransformationError(MediaItem, TransformationException)
, use onError(Composition, ExportResult, ExportException)
instead.onTransformationError(MediaItem, TransformationResult, TransformationException)
, use onError(Composition, ExportResult, ExportException)
instead.onFallbackApplied(MediaItem, TransformationRequest, TransformationRequest)
, use onFallbackApplied(Composition, TransformationRequest, TransformationRequest)
instead.TransformationResult
class. Use ExportResult
instead.TransformationException
class. Use ExportException
instead.Transformer.PROGRESS_STATE_NO_TRANSFORMATION
. Use Transformer.PROGRESS_STATE_NOT_STARTED
instead.Transformer.setListener()
. Use Transformer.addListener()
, Transformer.removeListener()
or Transformer.removeAllListeners()
instead.Transformer.startTransformation()
. Use Transformer.start(MediaItem, String)
instead.SingleFrameGlShaderProgram
. Use BaseGlShaderProgram
instead.Transformer.flattenForSlowMotion
. Use EditedMediaItem.flattenForSlowMotion
instead.