Releases: androidx/media
Releases · androidx/media
1.4.0-rc01
This release includes the following changes since the 1.4.0-beta01 release:
- Common Library:
- Add
Format.customDatato store app-provided custom information aboutFormatinstances.
- Add
- ExoPlayer:
- Fix some audio focus inconsistencies, e.g. not reporting full or transient focus loss while the player is paused (#1436).
- Fix potential
IndexOutOfBoundsExceptioncaused by extractors reporting additional tracks after the initial preparation step (#1476). EffectsinExoPlayer.setVideoEffect()will receive the timestamps with the renderer offset removed (#1098).- Fix potential
IllegalArgumentExceptionwhen handling player error that happened while reading ahead into another playlist item (#1483).
- Text:
- Fix an
IllegalArgumentExceptionfromLegacySubtitleUtilwhen a WebVTT subtitle sample contains no cues, e.g. as part of a DASH stream (#1516).
- Fix an
- Session:
- Allow the session activity to be set per controller to override the global session activity. The session activity can be defined for a controller at connection time by creating a
ConnectionResultwithAcceptedResultBuilder.setSessionActivivty(PendingIntent). Once connected, the session activity can be updated withMediaSession.setSessionActivity(ControllerInfo, PendingIntent). - Improve error replication of calls to
MediaLibrarySession.Callback. Error replication can now be configured by usingMediaLibrarySession.Builder.setLibraryErrorReplicationMode()for choosing the error type or opt-ing out of error replication which is on by default.
- Allow the session activity to be set per controller to override the global session activity. The session activity can be defined for a controller at connection time by creating a
- UI:
- Work around a platform bug causing stretched/cropped video when using
SurfaceViewinside a ComposeAndroidViewon API 34 (#1237).
- Work around a platform bug causing stretched/cropped video when using
- Demo app:
- Use
HttpEngineDataSourceas theHttpDataSourcewhen supported by the device.
- Use
1.4.0-beta01
- ExoPlayer:
- Add
ExoPlayer.isReleased()to check whetherExoplayer.release()has been called. - Add
ExoPlayer.Builder.setMaxSeekToPreviousPositionMsto configure the maximum position for whichseekToPrevious()seeks to the previous item (#1425).
- Add
- Transformer:
- Remove
ExportResult.processedInputsfield. If you use this field for codec details, then useDefaultDecoderFactory.listenerinstead. In case of a codec exception, codec details will be available in theExportException.codecInfo.
- Remove
- Extractors:
- Fix PCM audio format extraction in AVI containers.
- Image:
- Allow
nullas parameter forExoPlayer.setImageOutputto clear a previously setImageOutput.
- Allow
- Effect:
- Remove unused
OverlaySettings.useHdrsince dynamic range of overlay - Add HDR support for
TextOverlay. Luminance of the text overlay can be adjusted withOverlaySettings.setHdrLuminanceMultiplier.
- Remove unused
- Session:
- Add
MediaSession.Callback.onPlayerInteractionFinishedto inform sessions when a series of player interactions from a specific controller finished. - Add
SessionErrorand use it inSessionResultandLibraryResultinstead of the error code to provide more information about the error and how to resolve the error if possible. - Publish the code for the media3 controller test app that can be used to test interactions with apps publishing a media session.
- Propagate extras passed to media3's
MediaSession[Builder].setSessionExtras()to a media1 controller'sPlaybackStateCompat.getExtras(). - Map fatal and non-fatal errors to and from the platform session. A
PlaybackExceptionis mapped to a fatal error state of thePlaybackStateCompat. ASessionErrorsent to the media notification controller withMediaSession.sendError(ControllerInfo, SessionError)is mapped to a non-fatal error inPlaybackStateCompatwhich means that error code and message are set but the state of the platform session remains different toSTATE_ERROR.
- Add
- UI:
- HLS Extension:
- Fix a bug where non-primary playing playlists are not refreshed during live playback (#1240).
- Remove deprecated symbols:
- Remove
Bundleableinterface. This includes removing allBundleable.Creator<Foo> CREATORconstant fields. Callers should use theBundle toBundle()andstatic Foo fromBundle(Bundle)methods on each type instead.
- Remove
1.4.0-alpha02
This release includes the following changes since the 1.4.0-alpha01 release:
- Common Library:
- Forward presumed no-op seek calls to the protected
BasePlayer.seekToandSimpleBasePlayer.handleSeekmethods instead of ignoring them. If you are implementing these methods in a custom player, you may need to handle these additional calls withmediaItemIndex == C.INDEX_UNSET. - Remove compile dependency on enhanced Java 8 desugaring (#1312).
- Ensure the duration passed to
MediaItem.Builder.setImageDurationMsis ignored for a non-imageMediaItem(as documented).
- Forward presumed no-op seek calls to the protected
- ExoPlayer:
- Add
resettoBasePreloadManagerto release all the holding sources while keep the preload manager instance. - Add
ExoPlayer.setPriority(andBuilder.setPriority) to define the priority value used inPriorityTaskManagerand for MediaCodec importance from API 35. - Fix issue with updating the last rebuffer time which resulted in incorrect
bs(buffer starvation) key in CMCD (#1124). - Add
PreloadMediaSource.PreloadControl.onLoadedToTheEndOfSource(PreloadMediaSource)to indicate that the source has loaded to the end. This allows theDefaultPreloadManagerand the customPreloadMediaSource.PreloadControlimplementations to preload the next source or take other actions. - Fix bug where silence skipping at the end of items can trigger a playback exception.
- Add
cleartoPreloadMediaSourceto discard the preloading period. - Add new error code
PlaybackException.ERROR_CODE_DECODING_RESOURCES_RECLAIMEDthat is used when codec resources are reclaimed for higher priority tasks. - Let
AdsMediaSourceload preroll ads before initial content media preparation completes (#1358). - Fix bug where playback moved to
STATE_ENDEDwhen re-preparing a multi-period DASH live stream after the original period was already removed from the manifest. - Rename
onTimelineRefreshedtoonSourcePreparedandonPreparedtoonTracksSelectedinPreloadMediaSource.PreloadControl. Also rename the IntDefs inDefaultPreloadManager.Stageaccordingly. - Add experimental support for dynamic scheduling to better align work with CPU wake-cycles and delay waking up to when renderers can progress. You can enable this using
experimentalSetDynamicSchedulingEnabledwhen setting up your ExoPlayer instance. - Add
Renderer.getDurationToProgressMs. ARenderercan implement this method to return to ExoPlayer the duration that playback must advance for the renderer to progress. IfExoPlayeris set withexperimentalSetDynamicSchedulingEnabledthenExoPlayerwill call this method when calculating the time to schedule its work task. - Add
MediaCodecAdapter#OnBufferAvailableListenerto alert when input and output buffers are available for use byMediaCodecRenderer.MediaCodecRendererwill signalExoPlayerwhen receiving these callbacks and ifExoPlayeris set withexperimentalSetDynamicSchedulingEnabled, thenExoPlayerwill schedule its work loop as renderers can make progress. - Use data class for
LoadControlmethods instead of individual parameters.
- Add
- Transformer:
- Work around a decoder bug where the number of audio channels was capped at stereo when handling PCM input.
- When selecting tracks in
ExoPlayerAssetLoader, ignore audio channel count constraints as they only apply for playback. - Replace
androidx.media3.transformer.Muxerinterface withandroidx.media3.muxer.Muxerand removeandroidx.media3.transformer.Muxer. - Fix HEIC image loading from content URI schemes (#1373).
- Adjust audio track duration in
AudioGraphInputto improve AV sync.
- Extractors:
- MPEG-TS: Roll forward the change ensuring the last frame is rendered by passing the last access unit of a stream to the sample queue (#7909). Incorporating fixes to resolve the issues that emerged in I-frame only HLS streams(#1150) and H.262 HLS streams (#1126).
- MP3: Prefer the data size from an
Infoframe over the size reported by the underlying stream (e.g. file size, or HTTPContent-Lengthheader). This helps to exclude non-playable trailer data (e.g. album artwork) from constant bitrate seeking calculations, making seeks more accurate (#1376). - MP3: Use the frame count and other data in an
Infoframe (if present) to compute an average bitrate for constant bitrate seeking, rather than extrapolating from the bitrate of the frame after theInfoframe, which may be artificially small, e.g.PCUTframe (#1376).
- Audio:
- Fix DTS:X Profile 2 encoding attributes for passthrough playback (#1299).
- For offloaded playback, reset the tracking field for stream completion in
DefaultAudioSinkprior to callingAudioTrack.stop()so thatAudioTrack.StreamEventCallback#onPresentationEndedcorrectly identifies when all pending data has been played. - Fix bug in
SilenceSkippingAudioProcessorwhere transitions between different audio formats (for example stereo to mono) can cause the processor to throw an exception (#1352). - Implement
MediaCodecAudioRenderer.getDurationToProgressUsso that ExoPlayer will dynamically schedule its main work loop to when the MediaCodecAudioRenderer can make progress.
- Video:
- Fix decoder fallback logic for Dolby Vision to use a compatible AV1 decoder if needed (#1389).
- Text:
- Fix issue where subtitles starting before a seek position are skipped. This issue was only introduced in Media3 1.4.0-alpha01.
- Change default subtitle parsing behavior so it happens during extraction instead of during rendering (see ExoPlayer's architecture diagram for the difference between extraction and rendering).
- This change can be overridden by calling both
MediaSource.Factory.experimentalParseSubtitlesDuringExtraction(false)andTextRenderer.experimentalSetLegacyDecodingEnabled(true). See the docs on customization for how to plumb these components into anExoPlayerinstance. These methods (and all support for legacy subtitle decoding) will be removed in a future release. - Apps with custom
SubtitleDecoderimplementations need to update them to implementSubtitleParserinstead (andSubtitleParser.Factoryinstead ofSubtitleDecoderFactory).
- This change can be overridden by calling both
- PGS: Fix run-length decoding to resolve
0as a color index, instead of a literal color value (#1367). - CEA-708: Ignore
rowLockvalue. The CEA-708-E S-2023 spec states thatrowLockandcolumnLockshould both be assumed to be true, regardless of the values present in the stream (columnLocksupport is not implemented, so it's effectively assumed to always be false).- This was originally included in the
1.3.0-alpha01release notes, but the change was accidentally reverted before the1.3.0-rc01release. This is now fixed, so the change is present again.
- This was originally included in the
- CEA-708: Avoid duplicate newlines being added by ExoPlayer's naive handling of the 'set pen location' command (#1315).
- Metadata:
- Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort' (
soal), 'artist sort' (soar) and 'album artist sort' (soaa) MP4 tags were wrongly mapped to theTSO2,TSOAandTSOPID3 tags (#1302). - Fix reading of MP4 (/iTunes) numeric
gnre(genre) andtmpo(tempo) tags when the value is more than one byte long. - Propagate ID3
TCONframe toMediaMetadata.genre(#1305).
- Fix mapping of MP4 to ID3 sort tags. Previously the 'album sort' (
- Image:
- Add support for non-square DASH thumbnail grids (#1300).
- Add support for AVIF for API 34+.
- DataSource:
- Allow
ByteArrayDataSourceto resolve a URI to a byte array duringopen(), instead of being hard-coded at construction (#1405).
- Allow
- DRM:
- Allow setting a
LoadErrorHandlingPolicyonDefaultDrmSessionManagerProvider(#1271).
- Allow setting a
- Effect:
- Fix bug where
TimestampWrappercrashes when used withExoPlayer#setVideoEffects(#821). - Change default SDR color working space from linear colors to electrical BT 709 SDR video. Also provide third option to retain the original colorspace.
- Allow defining indeterminate z-order of EditedMediaItemSequences (#1055).
- Maintain a consistent luminance range across different pieces of HDR content (uses the HLG range).
- Add support for Ultra HDR (bitmap) overlays on HDR content.
- Allow
SeparableConvolutioneffects to be used before API 26.
- Fix bug where
- IMA extension:
- Promote API that is required for apps to play DAI ad streams to stable.
- Add
replaceAdTagParameters(Map <String, String>)...
1.4.0-alpha01
This release includes the following changes since the 1.3.1 release:
- ExoPlayer:
- Add
BasePreloadManagerwhich coordinates the preloading for multiple sources based on the priorities defined by theirrankingData. Customization is possible by extending this class. AddDefaultPreloadManagerwhich usesPreloadMediaSourceto preload media samples of the sources into memory, and uses an integerrankingDatathat indicates the index of an item on the UI. - Add
PlayerIdto most methods ofLoadControlto enableLoadControlimplementations to support multiple players. - Remove
Buffer.isDecodeOnly()andC.BUFFER_FLAG_DECODE_ONLY. There is no need to set this flag as renderers and decoders will decide to skip buffers based on timestamp. CustomRendererimplementations should check if the buffer time is at leastBaseRenderer.getLastResetPositionUs()to decide whether a sample should be shown. CustomSimpleDecoderimplementations can checkisAtLeastOutputStartTimeUsif needed or mark other buffers withDecoderOutputBuffer.shouldBeSkippedto skip them. - Allow a null value to be returned by
TargetPreloadStatusControl.getTargetPreloadStatus(T)to indicate not to preload aMediaSourcewith the givenrankingData. - Add
remove(MediaSource)toBasePreloadManager.
- Add
- Transformer:
- Add
audioConversionProcessandvideoConversionProcesstoExportResultindicating how the respective track in the output file was made. - Relax trim optimization H.264 level checks.
- Add support for changing between SDR and HDR input media in a sequence.
- Add support for composition-level audio effects.
- Add support for transcoding Ultra HDR images into HDR videos.
- Fix issue where the
DefaultAudioMixerdoes not output the correct amount of bytes after being reset and reused.
- Add
- Video:
- Fix issue where
Listener.onRenderedFirstFrame()arrives too early when switching surfaces mid-playback.
- Fix issue where
- DataSource:
- Implement support for
android.resource://package/idraw resource URIs wherepackageis different to the package of the current application. This wasn't previously documented to work, but is a more efficient way of accessing resources in another package than by name. - Eagerly check
urlis non-null in theDataSpecconstructors. This parameter was already annotated to be non-null.
- Implement support for
- Effect:
- Support multiple speed changes within the same
EditedMediaItemorCompositioninSpeedChangeEffect. - Support for HLG and PQ output from ultra HDR bitmap input.
- Add support for EGL_GL_COLORSPACE_BT2020_HLG_EXT, which improves HLG surface output in ExoPlayer.setVideoEffect and Transformer's Debug SurfaceView.
- Update Overlay matrix implementation to make it consistent with the documentation by flipping the x and y values applied in
setOverlayFrameAnchor(). If usingOverlaySettings.Builder.setOverlayFrameAnchor(), flip their x and y values by multiplying them by-1.
- Support multiple speed changes within the same
- Session:
- Change default of
CommandButton.enabledtotrueand ensure the value can stay false for controllers even if the associated command is available. - Add icon constants for
CommandButtonthat should be used instead of custom icon resources. - Add
MediaSessionService.isPlaybackOngoing()to let apps query whether the service needs to be stopped inonTaskRemoved()(#1219). - Add
MediaSessionService.pauseAllPlayersAndStopSelf()that conveniently allows to pause playback of all sessions and callstopSelfto terminate the lifecycle of theMediaSessionService. - Override
MediaSessionService.onTaskRemoved(Intent)to provide a safe default implementation that keeps the service running in the foreground if playback is ongoing or stops the service otherwise.
- Change default of
- Downloads:
- Ensure that
DownloadHelperdoes not leak unreleasedRendererinstances, which can eventually result in an app crashing withIllegalStateException: Too many receivers, total of 1000, registered for pid(#1224).
- Ensure that
- Test Utilities:
- Implement
onInit()andonRelease()inFakeRenderer. - Change
TestPlayerRunHelper.runUntil/playUntilmethods to fail on nonfatal errors (e.g. those reported toAnalyticsListener.onVideoCodecError). Use the newTestPlayerRunHelper.run(player).ignoringNonFatalErrors().untilXXX()method chain to disable this behavior.
- Implement
- Demo app:
- Use
DefaultPreloadManagerin the short form demo app.
- Use
- Remove deprecated symbols:
- Remove
CronetDataSourceFactory. UseCronetDataSource.Factoryinstead. - Remove some
DataSpecconstructors. UseDataSpec.Builderinstead.
- Remove
1.3.1
This release includes the following changes since the 1.3.0 release:
- Common Library:
- Add
Format.labelsto allow localized or other alternative labels.
- Add
- ExoPlayer:
- Fix issue where
PreloadMediaPeriodcannot retain the streams when it is preloaded again. - Apply the correct corresponding
TrackSelectionResultto the playing period in track reselection. - Start early-enabled renderers only after advancing the playing period when transitioning between media items (#1017).
- Add missing return type to proguard
-keepclasseswithmembersrule forDefaultVideoFrameProcessor.Factory.Builder.build()(#1187).
- Fix issue where
- Transformer:
- Add workaround for exception thrown due to
MediaMuxernot supporting negative presentation timestamps before API 30.
- Add workaround for exception thrown due to
- Track Selection:
DefaultTrackSelector: Prefer video tracks with a 'reasonable' frame rate (>=10fps) over those with a lower or unset frame rate. This ensures the player selects the 'real' video track in MP4s extracted from motion photos that can contain two HEVC tracks where one has a higher resolution but a very small number of frames (#1051).
- Extractors:
- Fix issue where padding was not skipped when reading odd-sized chunks from WAV files (#1117).
- MP3: Populate
Format.averageBitratefrom metadata frames such asXINGandVBRI. - MPEG-TS: Revert a change that aimed to ensure the last frame is rendered by passing the last access unit of a stream to the sample queue (#7909). This is due to the change causing new problems with I-frame only HLS streams (#1150) and H.262 HLS streams (#1126).
- Audio:
- Allow renderer recovery by disabling offload if audio track fails to initialize in offload mode.
- Video:
- Add workaround for a device issue on Galaxy Tab S7 FE, Chromecast with Google TV, and Lenovo M10 FHD Plus that causes 60fps H265 streams to be marked as unsupported
- Add workaround that ensures the first frame is always rendered while tunneling even if the device does not do this automatically as required by the API (#1169). (#966).
- Fix issue where HDR color info handling causes codec misbehavior and prevents adaptive format switches for SDR video tracks (#1158).
- Text:
- WebVTT: Prevent directly consecutive cues from creating spurious additional
CuesWithTiminginstances fromWebvttParser.parse(#1177).
- WebVTT: Prevent directly consecutive cues from creating spurious additional
- DRM:
- Work around a
NoSuchMethodErrorwhich can be thrown by theMediaDrmframework instead ofResourceBusyExceptionorNotProvisionedExceptionon some Android 14 devices (#1145).
- Work around a
- Effect:
- Improved PQ to SDR tone-mapping by converting color spaces.
- Session:
- UI:
- Fallback to include audio track language name if
Localecannot identify a display name (#988).
- Fallback to include audio track language name if
- DASH Extension:
- Populate all
Labelelements from the manifest intoFormat.labels(#1054).
- Populate all
- RTSP Extension:
- Skip empty session information values (i-tags) in SDP parsing (#1087).
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- Disable the MIDI extension as a local dependency by default because it requires an additional Maven repository to be configured. Users who need this module from a local dependency can re-enable it.
1.3.0
This release includes the following changes since the 1.2.1 release:
- Common Library:
- Implement support for
android.resource://package/[type/]nameraw resource URIs wherepackageis different to the package of the current application. This has always been documented to work, but wasn't correctly implemented until now. - Normalize MIME types set by app code or read from media to be fully lower-case.
- Define ads with a full
MediaIteminstead of a singleUriinAdPlaybackState. - Increase
minSdkto 19 (Android KitKat). This is aligned with all other AndroidX libraries, and is required for us to upgrade to the latest versions of our AndroidX dependencies. - Populate both
artworkUriandartworkDatainMediaMetadata.Builder.populate(MediaMetadata)when at least one of them is non-null (#964).
- Implement support for
- ExoPlayer:
- Add
PreloadMediaSourceandPreloadMediaPeriodthat allows apps to preload a content media source at a specific start position before playback.PreloadMediaSourcetakes care of preparing the content media source to receive theTimeline, preparing and caching the period at the given start position, selecting tracks and loading media data for the period. Apps control the preload progress by implementingPreloadMediaSource.PreloadControland set the preloaded source to the player for playback. - Add
ExoPlayer.setImageOutputthat allows apps to setImageRenderer.ImageOutput. DefaultRenderersFactorynow provides anImageRendererto the player by default with nullImageOutputandImageDecoder.Factory.DEFAULT.- Emit
Player.Listener.onPositionDiscontinuityevent when silence is skipped (#765). - Add experimental support for parsing subtitles during extraction. You can enable this using
MediaSource.Factory.experimentalParseSubtitlesDuringExtraction(). - Support adaptive media sources with
PreloadMediaSource. - Implement
HttpEngineDataSource, anHttpDataSourceusing the HttpEngine API. - Prevent subclassing
CompositeSequenceableLoader. This component was previously made extensible but was never subclassed within the library. Customizations can be done by wrapping an instance using the decorator pattern and implementing a customCompositeSequenceableLoaderFactory. - Fix issue where repeating the same time causes metadata from this item to be cleared (#1007).
- Rename
experimentalSetSubtitleParserFactorymethods onBundledChunkExtractor.FactoryandDefaultHlsExtractorFactorytosetSubtitleParserFactoryand disallow passingnull. Use the newexperimentalParseSubtitlesDuringExtraction(boolean)methods to control parsing behaviour. - Add support for customising the
SubtitleParser.Factoryused during extraction. This can be achieved withMediaSource.Factory.setSubtitleParserFactory(). - Add source prefix to all
Format.idfields generated fromMergingMediaSource. This helps to identify which source produced aFormat(#883). - Fix the regex used for validating custom Common Media Client Data (CMCD) key names by modifying it to only check for hyphen (#1028).
- Stop double-encoding CMCD query parameters (#1075).
- Add
- Transformer:
- Add support for flattening H.265/HEVC SEF slow motion videos.
- Increase transmuxing speed, especially for 'remove video' edits.
- Add API to ensure that the output file starts on a video frame. This can make the output of trimming operations more compatible with player implementations that don't show the first video frame until its presentation timestamp (#829).
- Add support for optimizing single asset mp4 trim operations.
- Add support to ensure a video frame has the first timestamp in the output file. Fixes output files beginning with black frame on iOS based players (#829).
- Track Selection:
- Add
DefaultTrackSelector.selectImageTrackto enable image track selection. - Add
TrackSelectionParameters.isPrioritizeImageOverVideoEnabledto determine whether to select an image track if both an image track and a video track are available. The default value isfalsewhich means selecting a video track is prioritized.
- Add
- Extractors:
- Add additional AV1C parsing to MP4 extractor to retrieve
ColorInfo.colorSpace,ColorInfo.colorTransfer, andColorInfo.colorRangevalues (#692). - MP3: Use constant bitrate (CBR) seeking for files with an
Infoheader (the CBR equivalent of theXingheader). Previously we used the seek table from theInfoheader, but this results in less precise seeking than if we ignore it and assume the file is CBR. - MPEG2-TS: Add DTS, DTS-LBR and DTS:X Profile2 support (#275).
- Extract audio types from TS descriptors and map them to role flags, allowing users to make better-informed audio track selections (#973).
- Add additional AV1C parsing to MP4 extractor to retrieve
- Audio:
- Video:
- Change the
MediaCodecVideoRendererconstructor that takes aVideoFrameProcessor.Factoryargument and replace it with a constructor that takes aVideoSinkProviderargument. Apps that want to inject a customVideoFrameProcessor.Factorycan instantiate aCompositingVideoSinkProviderthat uses the customVideoFrameProcessor.Factoryand pass the video sink provider toMediaCodecVideoRenderer.
- Change the
- Text:
- Fix serialization of bitmap cues to resolve
Tried to marshall a Parcel that contained Binder objectserror when usingDefaultExtractorsFactory.setTextTrackTranscodingEnabled(#836). - CEA-708: Ignore
rowLockvalue. The CEA-708-E S-2023 spec states thatrowLockandcolumnLockshould both be assumed to be true, regardless of the values present in the stream (columnLocksupport is not implemented, so it's effectively assumed to always be false).
- Fix serialization of bitmap cues to resolve
- Image:
- Add support for DASH thumbnails. Grid images are cropped and individual thumbnails are provided to
ImageOutputclose to their presentation times.
- Add support for DASH thumbnails. Grid images are cropped and individual thumbnails are provided to
- DRM:
- Play 'clear lead' unencrypted samples in DRM content immediately by default, even if the keys for the later encrypted samples aren't ready yet. This may lead to mid-playback stalls if the keys still aren't ready when the playback position reaches the encrypted samples (but previously playback wouldn't have started at all by this point). This behavior can be disabled with
MediaItem.DrmConfiguration.Builder.setPlayClearContentWithoutKeyorDefaultDrmSessionManager.Builder.setPlayClearSamplesWithoutKeys.
- Play 'clear lead' unencrypted samples in DRM content immediately by default, even if the keys for the later encrypted samples aren't ready yet. This may lead to mid-playback stalls if the keys still aren't ready when the playback position reaches the encrypted samples (but previously playback wouldn't have started at all by this point). This behavior can be disabled with
- IMA extension:
- Fix issue where DASH and HLS ads without the appropriate file extension can't be played.
- Session:
- Disable double-click detection for TV apps (#962).
- Fix issue where
MediaItem.RequestMetadatawith just non-null extras is not transmitted between media controllers and sessions. - Add constructor to
MediaLibrarySession.Builderthat only takes aContextinstead of aMediaLibraryService.
- HLS Extension:
- Reduce
HlsMediaPeriodto package-private visibility. This type shouldn't be directly depended on from outside the HLS package. - Resolve seeks to beginning of a segment more efficiently (#1031).
- Reduce
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- MIDI decoder: Ignore SysEx event messages (#710).
- Test Utilities:
- Don't pause playback in
TestPlayerRunHelper.playUntilPosition. The test keeps the playback in a playing state, but suspends progress until the test is able to add assertions and further actions.
- Don't pause playback in
- Demo app:
- Add a shortform demo module to demo the usage of
PreloadMediaSourcewith the short-form content use case.
- Add a shortform demo module to demo the usage of
1.3.0-rc01
This release includes the following changes since the 1.3.0-beta01 release:
- ExoPlayer:
- Add source prefix to all
Format.idfields generated fromMergingMediaSource. This helps to identify which source produced aFormat(#883). - Fix the regex used for validating custom Common Media Client Data (CMCD) key names by modifying it to only check for hyphen (#1028).
- Stop double-encoding CMCD query parameters (#1075).
- Add source prefix to all
- Audio:
- Session:
- Fix issue where
MediaItem.RequestMetadatawith just non-null extras is not transmitted between media controllers and sessions. - Add constructor to
MediaLibrarySession.Builderthat only takes aContextinstead of aMediaLibraryService.
- Fix issue where
- HLS Extension:
- Resolve seeks to beginning of a segment more efficiently (#1031).
1.3.0-beta01
This release includes the following changes since the 1.3.0-alpha01 release:
- Common Library:
- Populate both
artworkUriandartworkDatainMediaMetadata.Builder.populate(MediaMetadata)when at least one of them is non-null (#964).
- Populate both
- ExoPlayer:
- Prevent subclassing
CompositeSequenceableLoader. This component was previously made extensible but was never subclassed within the library. Customizations can be done by wrapping an instance using the decorator pattern and implementing a customCompositeSequenceableLoaderFactory. - Fix issue where repeating the same time causes metadata from this item to be cleared (#1007).
- Rename
experimentalSetSubtitleParserFactorymethods onBundledChunkExtractor.FactoryandDefaultHlsExtractorFactorytosetSubtitleParserFactoryand disallow passingnull. Use the newexperimentalParseSubtitlesDuringExtraction(boolean)methods to control parsing behaviour. - Add support for customising the
SubtitleParser.Factoryused during extraction. This can be achieved withMediaSource.Factory.setSubtitleParserFactory().
- Prevent subclassing
- Extractors:
- MP3: Use constant bitrate (CBR) seeking for files with an
Infoheader (the CBR equivalent of theXingheader). Previously we used the seek table from theInfoheader, but this results in less precise seeking than if we ignore it and assume the file is CBR. - MPEG2-TS: Add DTS, DTS-LBR and DTS:X Profile2 support (#275).
- Extract audio types from TS descriptors and map them to role flags, allowing users to make better-informed audio track selections (#973).
- MP3: Use constant bitrate (CBR) seeking for files with an
- Image:
- Add support for DASH thumbnails. Grid images are cropped and individual thumbnails are provided to
ImageOutputclose to their presentation times.
- Add support for DASH thumbnails. Grid images are cropped and individual thumbnails are provided to
- Session:
- Disable double-click detection for TV apps (#962).
1.3.0-alpha01
This release includes the following changes since the 1.2.1 release:
- Common Library:
- Implement support for
android.resource://package/[type/]nameraw resource URIs wherepackageis different to the package of the current application. This has always been documented to work, but wasn't correctly implemented until now. - Normalize MIME types set by app code or read from media to be fully lower-case.
- Define ads with a full
MediaIteminstead of a singleUriinAdPlaybackState. - Increase
minSdkto 19 (Android KitKat). This is aligned with all other AndroidX libraries, and is required for us to upgrade to the latest versions of our AndroidX dependencies.
- Implement support for
- ExoPlayer:
- Add
PreloadMediaSourceandPreloadMediaPeriodthat allows apps to preload a content media source at a specific start position before playback.PreloadMediaSourcetakes care of preparing the content media source to receive theTimeline, preparing and caching the period at the given start position, selecting tracks and loading media data for the period. Apps control the preload progress by implementingPreloadMediaSource.PreloadControland set the preloaded source to the player for playback. - Add
ExoPlayer.setImageOutputthat allows apps to setImageRenderer.ImageOutput. DefaultRenderersFactorynow provides anImageRendererto the player by default with nullImageOutputandImageDecoder.Factory.DEFAULT.- Emit
Player.Listener.onPositionDiscontinuityevent when silence is skipped (#765). - Add experimental support for parsing subtitles during extraction. You can enable this using
MediaSource.Factory.experimentalParseSubtitlesDuringExtraction(). - Support adaptive media sources with
PreloadMediaSource. - Implement
HttpEngineDataSource, anHttpDataSourceusing the HttpEngine API.
- Add
- Transformer:
- Add support for flattening H.265/HEVC SEF slow motion videos.
- Increase transmuxing speed, especially for 'remove video' edits.
- Add API to ensure that the output file starts on a video frame. This can make the output of trimming operations more compatible with player implementations that don't show the first video frame until its presentation timestamp (#829).
- Track Selection:
- Add
DefaultTrackSelector.selectImageTrackto enable image track selection. - Add
TrackSelectionParameters.isPrioritizeImageOverVideoEnabledto determine whether to select an image track if both an image track and a video track are available. The default value isfalsewhich means selecting a video track is prioritized.
- Add
- Extractors:
- Add additional AV1C parsing to MP4 extractor to retrieve
ColorInfo.colorSpace,ColorInfo.colorTransfer, andColorInfo.colorRangevalues (#692).
- Add additional AV1C parsing to MP4 extractor to retrieve
- Video:
- Change the
MediaCodecVideoRendererconstructor that takes aVideoFrameProcessor.Factoryargument and replace it with a constructor that takes aVideoSinkProviderargument. Apps that want to inject a customVideoFrameProcessor.Factorycan instantiate aCompositingVideoSinkProviderthat uses the customVideoFrameProcessor.Factoryand pass the video sink provider toMediaCodecVideoRenderer.
- Change the
- Text:
- Fix serialization of bitmap cues to resolve
Tried to marshall a Parcel that contained Binder objectserror when usingDefaultExtractorsFactory.setTextTrackTranscodingEnabled(#836). - CEA-708: Ignore
rowLockvalue. The CEA-708-E S-2023 spec states thatrowLockandcolumnLockshould both be assumed to be true, regardless of the values present in the stream (columnLocksupport is not implemented, so it's effectively assumed to always be false).
- Fix serialization of bitmap cues to resolve
- DRM:
- Play 'clear lead' unencrypted samples in DRM content immediately by default, even if the keys for the later encrypted samples aren't ready yet. This may lead to mid-playback stalls if the keys still aren't ready when the playback position reaches the encrypted samples (but previously playback wouldn't have started at all by this point). This behavior can be disabled with
MediaItem.DrmConfiguration.Builder.setPlayClearContentWithoutKeyorDefaultDrmSessionManager.Builder.setPlayClearSamplesWithoutKeys.
- Play 'clear lead' unencrypted samples in DRM content immediately by default, even if the keys for the later encrypted samples aren't ready yet. This may lead to mid-playback stalls if the keys still aren't ready when the playback position reaches the encrypted samples (but previously playback wouldn't have started at all by this point). This behavior can be disabled with
- IMA extension:
- Fix issue where DASH and HLS ads without the appropriate file extension can't be played.
- HLS Extension:
- Reduce
HlsMediaPeriodto package-private visibility. This type shouldn't be directly depended on from outside the HLS package.
- Reduce
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- MIDI decoder: Ignore SysEx event messages (#710).
- Test Utilities:
- Don't pause playback in
TestPlayerRunHelper.playUntilPosition. The test keeps the playback in a playing state, but suspends progress until the test is able to add assertions and further actions.
- Don't pause playback in
- Demo app:
- Add a shortform demo module to demo the usage of
PreloadMediaSourcewith the short-form content use case.
- Add a shortform demo module to demo the usage of
1.2.1
This release includes the following changes since the 1.2.0 release:
- ExoPlayer:
- Fix issue where manual seeks outside of the
LiveConfiguration.min/maxOffsetrange keep adjusting the offset back tomin/maxOffset. - Fix issue that OPUS and VORBIS channel layouts are wrong for 3, 5, 6, 7 and 8 channels (#8396).
- Fix issue where track selections after seek to zero in a live stream incorrectly let the stream start at its default position (#9347).
- Fix the issue where new instances of
CmcdData.Factorywere receiving negative values forbufferedDurationUsfrom chunk sources, resulting in anIllegalArgumentException(#888).
- Fix issue where manual seeks outside of the
- Transformer:
- Work around an issue where the encoder would throw at configuration time due to setting a high operating rate.
- Extractors:
- Mark secondary (unplayable) HEVC tracks in JPEG motion photos as
ROLE_FLAG_ALTERNATEto prevent them being automatically selected for playback because of their higher resolution. - Fix wrong keyframe detection for TS H264 streams (#864).
- Fix duration estimation of TS streams that are longer than 47721 seconds (#855).
- Mark secondary (unplayable) HEVC tracks in JPEG motion photos as
- Audio:
- Fix handling of EOS for
SilenceSkippingAudioProcessorwhen called multiple times (#712).
- Fix handling of EOS for
- Video:
- Add workaround for a device issue on Galaxy Tab S7 FE, Chromecast with Google TV, and Lenovo M10 FHD Plus that causes 60fps AVC streams to be marked as unsupported (#693).
- Metadata:
- Fix bug where
MediaMetadatawas only populated from Vorbis comments (#876). - Catch
OutOfMemoryErrorwhen parsing very large ID3 frames, meaning playback can continue without the tag info instead of playback failing completely.
- Fix bug where
- DRM:
- Extend workaround for spurious ClearKey
https://default.urllicense URL to API 33+ (previously the workaround only applied on API 33 exactly) (#837). - Fix
ERROR_DRM_SESSION_NOT_OPENEDwhen switching from encrypted to clear content without a surface attached to the player. The error was due to incorrectly using a secure decoder to play the clear content.
- Extend workaround for spurious ClearKey
- Session:
- Put the custom keys and values in
MediaMetadataCompattoMediaMetadata.extrasandMediaMetadata.extrasto
MediaMetadataCompat(#756, #802). - Fix broadcasting
notifyChildrenChangedfor legacy controllers (#644). - Fix a bug where setting a negative time for a disabled
setWhentimer of the notification caused a crash on some devices (#903). - Fix
IllegalStateExceptionwhen the media notification controller hasn't completed connecting when the first notification update is requested (#917).
- Put the custom keys and values in
- UI:
- DASH Extension:
- Parse "f800" as channel count of 5 for Dolby in DASH manifest (#688).
- Decoder Extensions (FFmpeg, VP9, AV1, MIDI, etc.):
- Cast Extension:
- Sanitize creation of a
Timelineto not crash the app when loading media fails on the cast device (#708).
- Sanitize creation of a