Skip to content

1.4.0-alpha02

Pre-release
Pre-release
Compare
Choose a tag to compare
@tianyif tianyif released this 07 Jun 12:10
· 683 commits to release since this release

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.seekTo and SimpleBasePlayer.handleSeek methods instead of ignoring them. If you are implementing these methods in a custom player, you may need to handle these additional calls with mediaItemIndex == C.INDEX_UNSET.
    • Remove compile dependency on enhanced Java 8 desugaring (#1312).
    • Ensure the duration passed to MediaItem.Builder.setImageDurationMs is ignored for a non-image MediaItem (as documented).
  • ExoPlayer:
    • Add reset to BasePreloadManager to release all the holding sources while keep the preload manager instance.
    • Add ExoPlayer.setPriority (and Builder.setPriority) to define the priority value used in PriorityTaskManager and 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 the DefaultPreloadManager and the custom PreloadMediaSource.PreloadControl implementations 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 clear to PreloadMediaSource to discard the preloading period.
    • Add new error code PlaybackException.ERROR_CODE_DECODING_RESOURCES_RECLAIMED that is used when codec resources are reclaimed for higher priority tasks.
    • Let AdsMediaSource load preroll ads before initial content media preparation completes (#1358).
    • Fix bug where playback moved to STATE_ENDED when re-preparing a multi-period DASH live stream after the original period was already removed from the manifest.
    • Rename onTimelineRefreshed to onSourcePrepared and onPrepared to onTracksSelected in PreloadMediaSource.PreloadControl. Also rename the IntDefs in DefaultPreloadManager.Stage accordingly.
    • 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 experimentalSetDynamicSchedulingEnabled when setting up your ExoPlayer instance.
    • Add Renderer.getDurationToProgressMs. A Renderer can implement this method to return to ExoPlayer the duration that playback must advance for the renderer to progress. If ExoPlayer is set with experimentalSetDynamicSchedulingEnabled then ExoPlayer will call this method when calculating the time to schedule its work task.
    • Add MediaCodecAdapter#OnBufferAvailableListener to alert when input and output buffers are available for use by MediaCodecRenderer. MediaCodecRenderer will signal ExoPlayer when receiving these callbacks and if ExoPlayer is set with experimentalSetDynamicSchedulingEnabled, then ExoPlayer will schedule its work loop as renderers can make progress.
    • Use data class for LoadControl methods instead of individual parameters.
  • 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.Muxer interface with androidx.media3.muxer.Muxer and remove androidx.media3.transformer.Muxer.
    • Fix HEIC image loading from content URI schemes (#1373).
    • Adjust audio track duration in AudioGraphInput to 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 Info frame over the size reported by the underlying stream (e.g. file size, or HTTP Content-Length header). 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 Info frame (if present) to compute an average bitrate for constant bitrate seeking, rather than extrapolating from the bitrate of the frame after the Info frame, which may be artificially small, e.g. PCUT frame (#1376).
  • Audio:
    • Fix DTS:X Profile 2 encoding attributes for passthrough playback (#1299).
    • For offloaded playback, reset the tracking field for stream completion in DefaultAudioSink prior to calling AudioTrack.stop() so that AudioTrack.StreamEventCallback#onPresentationEnded correctly identifies when all pending data has been played.
    • Fix bug in SilenceSkippingAudioProcessor where transitions between different audio formats (for example stereo to mono) can cause the processor to throw an exception (#1352).
    • Implement MediaCodecAudioRenderer.getDurationToProgressUs so 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) and TextRenderer.experimentalSetLegacyDecodingEnabled(true). See the docs on customization for how to plumb these components into an ExoPlayer instance. These methods (and all support for legacy subtitle decoding) will be removed in a future release.
      • Apps with custom SubtitleDecoder implementations need to update them to implement SubtitleParser instead (and SubtitleParser.Factory instead of SubtitleDecoderFactory).
    • PGS: Fix run-length decoding to resolve 0 as a color index, instead of a literal color value (#1367).
    • CEA-708: Ignore rowLock value. The CEA-708-E S-2023 spec states that rowLock and columnLock should both be assumed to be true, regardless of the values present in the stream (columnLock support is not implemented, so it's effectively assumed to always be false).
      • This was originally included in the 1.3.0-alpha01 release notes, but the change was accidentally reverted before the 1.3.0-rc01 release. This is now fixed, so the change is present again.
    • 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 the TSO2, TSOA and TSOP ID3 tags (#1302).
    • Fix reading of MP4 (/iTunes) numeric gnre (genre) and tmpo (tempo) tags when the value is more than one byte long.
    • Propagate ID3 TCON frame to MediaMetadata.genre (#1305).
  • Image:
    • Add support for non-square DASH thumbnail grids (#1300).
    • Add support for AVIF for API 34+.
  • DataSource:
    • Allow ByteArrayDataSource to resolve a URI to a byte array during open(), instead of being hard-coded at construction (#1405).
  • DRM:
    • Allow setting a LoadErrorHandlingPolicy on DefaultDrmSessionManagerProvider (#1271).
  • Effect:
    • Fix bug where TimestampWrapper crashes when used with ExoPlayer#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 SeparableConvolution effects to be used before API 26.
  • IMA extension:
    • Promote API that is required for apps to play DAI ad streams to stable.
    • Add replaceAdTagParameters(Map <String, String>) to ImaServerSideAdInsertionMediaSource.AdLoader that allows replacing ad tag parameters at runtime.
    • Fix bug where VideoAdPlayer.VideoAdPlayerCallback.onError was not called when a player error happened during ad playback (#1334).
    • Bump IMA SDK version to 3.33.0 to fix a NullPointerException when using data:// ad tag URIs (#700).
  • Session:
    • Hide seekbar in the media notification for live streams by not setting the duration into the platform session metadata (#1256).
    • Align conversion of MediaMetadata to MediaDescriptionCompat, to use the same preferred order and logic when selecting metadata properties as in media1.
    • Add MediaSession.sendError() that allows sending non-fatal errors to Media3 controller. When using the notification controller (see MediaSession.getMediaNotificationControllerInfo()), the custom error is used to update the PlaybackState of the platform session to an error state with the given error information (#543).
  • Cronet Extension:
    • Fix SocketTimeoutException in CronetDataSource. In some versions of Cronet, the request provided by the callback is not always the same. This leads to callback not completing and request timing out (https://issuetracker.google.com/328442628).
  • HLS Extension:
    • Fix bug where pending EMSG samples waiting for a discontinuity were delegated in HlsSampleStreamWrapper with an incorrect offset causing an IndexOutOfBoundsException or an IllegalArgumentException (#1002).
    • Fix bug where non-primary playlists keep reloading for LL-HLS streams (#1240).
    • Fix bug where enabling CMCD for HLS with initialization segments resulted in Source Error and IllegalArgumentException.
  • DASH Extension:
    • Fix bug where re-preparing a multi-period live stream can throw an IndexOutOfBoundsException (#1329).
    • Add support for dashif:Laurl license urls (#1345).
  • Cast Extension:
    • Fix bug that converted the album title of the MediaQueueItem to the artist in the Media3 media item (#1255).
  • Demo app:
    • Allow setting repeat mode with Intent arguments from command line (#1266).
  • Remove deprecated symbols:
    • Remove setContentTypePredicate(Predicate) method from DefaultHttpDataSource, OkHttpDataSource and CronetDataSource. Use the equivalent method on each XXXDataSource.Factory instead.
    • Remove OkHttpDataSource constructors and OkHttpDataSourceFactory. Use OkHttpDataSource.Factory instead.
    • Remove PlayerMessage.setHandler(Handler). Use setLooper(Looper) instead.
    • Remove Timeline.Window.isLive field. Use the isLive() method instead.
    • Remove DefaultHttpDataSource constructors. Use DefaultHttpDataSource.Factory instead.
    • Remove DashMediaSource.DEFAULT_LIVE_PRESENTATION_DELAY_MS. Use DashMediaSource.DEFAULT_FALLBACK_TARGET_LIVE_OFFSET_MS instead.
    • Remove MediaCodecInfo.isSeamlessAdaptationSupported(Format, Format, boolean). Use MediaCodecInfo.canReuseCodec(Format, Format) instead.
    • Remove DrmSessionManager.DUMMY and getDummyDrmSessionManager() method. Use DrmSessionManager.DRM_UNSUPPORTED instead.
    • Remove AnalyticsListener.onAudioInputFormatChanged(EventTime, Format), AnalyticsListener.onVideoInputFormatChanged(EventTime, Format), AudioRendererEventListener.onAudioInputFormatChanged(Format), VideoRendererEventListener.onVideoInputFormatChanged(Format). Use the overloads that take a DecoderReuseEvaluation instead.
    • Remove RendererSupport.FormatSupport IntDef and FORMAT_HANDLED, FORMAT_EXCEEDS_CAPABILITIES, FORMAT_UNSUPPORTED_DRM, FORMAT_UNSUPPORTED_SUBTYPE, FORMAT_UNSUPPORTED_TYPE constants. Use the equivalent IntDef and constants in androidx.media3.common.C instead (e.g. C.FORMAT_HANDLED).