Skip to content

Commit 35eaf3e

Browse files
[dependabot]: Bump exoplayer_version from 1.4.1 to 1.5.1 in /packages/video_player/video_player_android/android (#8414)
Bumps `exoplayer_version` from 1.4.1 to 1.5.1. Updates `androidx.media3:media3-exoplayer` from 1.4.1 to 1.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/releases">androidx.media3:media3-exoplayer's releases</a>.</em></p> <blockquote> <h2>1.5.1</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h2>1.5.0</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a> now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, <a href="https://issuetracker.google.com/345472586#comment7">due to <code>compileSdk = 35</code></a>. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has <a href="http://r.android.com/3156141">already been done in other AndroidX libraries</a>.</li> </ul> </li> <li>ExoPlayer: <ul> <li><code>MediaCodecRenderer.onProcessedStreamChange()</code> can now be called for every media item. Previously it was not called for the first one. Use <code>MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()</code> to enable this.</li> <li>Add <code>PreloadMediaSource.PreloadControl.onPreloadError</code> to allow <code>PreloadMediaSource.PreloadControl</code> implementations to take actions when error occurs.</li> <li>Add <code>BasePreloadManager.Listener</code> to propagate preload events to apps.</li> <li>Allow changing SNTP client timeout and retry alternative addresses on timeout (<a href="https://redirect.github.com/androidx/media/issues/1540">#1540</a>).</li> <li>Remove <code>MediaCodecAdapter.Configuration.flags</code> as the field was always zero.</li> <li>Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).</li> <li>Defer the blocking call to <code>Context.getSystemService(Context.AUDIO_SERVICE)</code> until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (<a href="https://redirect.github.com/androidx/media/pull/1616">#1616</a>).</li> <li>Allow playback regardless of buffered duration when loading fails (<a href="https://redirect.github.com/androidx/media/issues/1571">#1571</a>).</li> <li>Add <code>AnalyticsListener.onRendererReadyChanged()</code> to signal when individual renderers allow playback to be ready.</li> <li>Fix <code>MediaCodec.CryptoException</code> sometimes being reported as an &quot;unexpected runtime error&quot; when <code>MediaCodec</code> is operated in asynchronous mode (default behaviour on API 31+).</li> <li>Pass <code>bufferedDurationUs</code> instead of <code>bufferedPositionUs</code> with <code>PreloadMediaSource.PreloadControl.onContinueLoadingRequested()</code>. Also changes <code>DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS</code> to <code>DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS</code>, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.</li> <li>Add <code>ForwardingRenderer</code> implementation that forwards all method calls to another renderer (<a href="https://redirect.github.com/androidx/media/pull/1703">1703</a>).</li> <li>Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling <code>ExoPlayer.setPreloadConfiguration(PreloadConfiguration)</code> accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, <code>DefaultLoadControl</code> restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing <code>LoadControl.shouldContinuePreloading()</code> accordingly (like when overriding this method in <code>DefaultLoadControl</code>). The default implementation of <code>LoadControl</code> disables preloading in case an app is using a custom implementation of <code>LoadControl</code>.</li> <li>Add method <code>MediaSourceEventListener.EventDispatcher.dispatchEvent()</code> to allow invoking events of subclass listeners (<a href="https://redirect.github.com/androidx/media/pull/1736">1736</a>).</li> <li>Add <code>DefaultPreloadManager.Builder</code> that builds the <code>DefaultPreloadManager</code> and <code>ExoPlayer</code> instances with consistently shared configurations.</li> <li>Remove <code>Renderer[]</code> parameter from <code>LoadControl.onTracksSelected()</code> as <code>DefaultLoadControl</code> implementation can retrieve the stream types from <code>ExoTrackSelection[]</code>.</li> <li>Deprecated <code>DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])</code> and marked method as final to prevent overrides. The new <code>DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])</code> should be used instead.</li> <li>Report <code>MediaSourceEventListener</code> events from secondary sources in <code>MergingMediaSource</code>. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with <code>MediaItem.LocalConfiguration.subtitleConfigurations</code>), which may appear as duplicate load events emitted from <code>AnalyticsListener</code>.</li> <li>Prevent subtitle &amp; metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (<a href="https://redirect.github.com/google/ExoPlayer/issues/1722">#1722</a>). <ul> <li>In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via <code>onLoadError</code> callbacks.</li> <li>In legacy subtitle handling (during rendering), only associated load errors are emitted via <code>onLoadError</code> callbacks while parse errors are silently ignored (this is pre-existing behaviour).</li> </ul> </li> <li>Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (<a href="https://redirect.github.com/androidx/media/issues/1698">#1698</a>).</li> <li>Add a setter to <code>SntpClient</code> to set the max elapsed time since the last update after which the client is re-initialized (<a href="https://redirect.github.com/androidx/media/pull/1794">#1794</a>).</li> </ul> </li> <li>Transformer:</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/blob/release/RELEASENOTES.md">androidx.media3:media3-exoplayer's changelog</a>.</em></p> <blockquote> <h3>1.5.1 (2024-12-19)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h3>1.5.0 (2024-11-27)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a></li> </ul> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/androidx/media/commit/76088cd6af7f263aba238b7a48d64bd4f060cb8b"><code>76088cd</code></a> Bump Media3 version to 1.5.1</li> <li><a href="https://github.com/androidx/media/commit/7ae9ddf1662b7174a2d82eb14a0f07fc5d7a3e95"><code>7ae9ddf</code></a> Update release notes for Media3 1.5.1 release</li> <li><a href="https://github.com/androidx/media/commit/e4e59cd929af4d80b84d9a392ae82cb4aa07cf0b"><code>e4e59cd</code></a> Switch default of async crypto mode to disabled</li> <li><a href="https://github.com/androidx/media/commit/508a4258a32c4f03ae69721a0609075d9d817b77"><code>508a425</code></a> Switch play FGS exemption to use custom action instead of commands</li> <li><a href="https://github.com/androidx/media/commit/52f976179622c764794859195dbecd6bea4104a4"><code>52f9761</code></a> Don't check codec's profile for MV-HEVC video.</li> <li><a href="https://github.com/androidx/media/commit/de91ebc6ae101cdd4c9e4246cb6840a7962aa38b"><code>de91ebc</code></a> Add vorbis comment support for track/disc numbering fields, and genre</li> <li><a href="https://github.com/androidx/media/commit/5d9badcb502aebc57027ba407959344b55731e9d"><code>5d9badc</code></a> Fix ReplacingCuesResolver.discardCuesBeforeTimeUs to retain active cue</li> <li><a href="https://github.com/androidx/media/commit/121b79ae96e334e79ec0f886fccf81357b9054d0"><code>121b79a</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1943">#1943</a> from DolbyLaboratories:dlb/ac4-ajoc/dev</li> <li><a href="https://github.com/androidx/media/commit/fa9689ef9ad10d97f60b8b9496222ae0e2624cd5"><code>fa9689e</code></a> Clarify <code>CommandButton</code> javadoc around <code>iconResId</code> and <code>ICON_UNDEFINED</code></li> <li><a href="https://github.com/androidx/media/commit/f5bbb39e90ef54e163e716e5b01122d730192503"><code>f5bbb39</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1823">#1823</a> from MGaetan89:remove_outdated_sdk_check</li> <li>Additional commits viewable in <a href="https://github.com/androidx/media/compare/1.4.1...1.5.1">compare view</a></li> </ul> </details> <br /> Updates `androidx.media3:media3-exoplayer-hls` from 1.4.1 to 1.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/releases">androidx.media3:media3-exoplayer-hls's releases</a>.</em></p> <blockquote> <h2>1.5.1</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h2>1.5.0</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a> now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, <a href="https://issuetracker.google.com/345472586#comment7">due to <code>compileSdk = 35</code></a>. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has <a href="http://r.android.com/3156141">already been done in other AndroidX libraries</a>.</li> </ul> </li> <li>ExoPlayer: <ul> <li><code>MediaCodecRenderer.onProcessedStreamChange()</code> can now be called for every media item. Previously it was not called for the first one. Use <code>MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()</code> to enable this.</li> <li>Add <code>PreloadMediaSource.PreloadControl.onPreloadError</code> to allow <code>PreloadMediaSource.PreloadControl</code> implementations to take actions when error occurs.</li> <li>Add <code>BasePreloadManager.Listener</code> to propagate preload events to apps.</li> <li>Allow changing SNTP client timeout and retry alternative addresses on timeout (<a href="https://redirect.github.com/androidx/media/issues/1540">#1540</a>).</li> <li>Remove <code>MediaCodecAdapter.Configuration.flags</code> as the field was always zero.</li> <li>Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).</li> <li>Defer the blocking call to <code>Context.getSystemService(Context.AUDIO_SERVICE)</code> until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (<a href="https://redirect.github.com/androidx/media/pull/1616">#1616</a>).</li> <li>Allow playback regardless of buffered duration when loading fails (<a href="https://redirect.github.com/androidx/media/issues/1571">#1571</a>).</li> <li>Add <code>AnalyticsListener.onRendererReadyChanged()</code> to signal when individual renderers allow playback to be ready.</li> <li>Fix <code>MediaCodec.CryptoException</code> sometimes being reported as an &quot;unexpected runtime error&quot; when <code>MediaCodec</code> is operated in asynchronous mode (default behaviour on API 31+).</li> <li>Pass <code>bufferedDurationUs</code> instead of <code>bufferedPositionUs</code> with <code>PreloadMediaSource.PreloadControl.onContinueLoadingRequested()</code>. Also changes <code>DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS</code> to <code>DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS</code>, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.</li> <li>Add <code>ForwardingRenderer</code> implementation that forwards all method calls to another renderer (<a href="https://redirect.github.com/androidx/media/pull/1703">1703</a>).</li> <li>Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling <code>ExoPlayer.setPreloadConfiguration(PreloadConfiguration)</code> accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, <code>DefaultLoadControl</code> restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing <code>LoadControl.shouldContinuePreloading()</code> accordingly (like when overriding this method in <code>DefaultLoadControl</code>). The default implementation of <code>LoadControl</code> disables preloading in case an app is using a custom implementation of <code>LoadControl</code>.</li> <li>Add method <code>MediaSourceEventListener.EventDispatcher.dispatchEvent()</code> to allow invoking events of subclass listeners (<a href="https://redirect.github.com/androidx/media/pull/1736">1736</a>).</li> <li>Add <code>DefaultPreloadManager.Builder</code> that builds the <code>DefaultPreloadManager</code> and <code>ExoPlayer</code> instances with consistently shared configurations.</li> <li>Remove <code>Renderer[]</code> parameter from <code>LoadControl.onTracksSelected()</code> as <code>DefaultLoadControl</code> implementation can retrieve the stream types from <code>ExoTrackSelection[]</code>.</li> <li>Deprecated <code>DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])</code> and marked method as final to prevent overrides. The new <code>DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])</code> should be used instead.</li> <li>Report <code>MediaSourceEventListener</code> events from secondary sources in <code>MergingMediaSource</code>. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with <code>MediaItem.LocalConfiguration.subtitleConfigurations</code>), which may appear as duplicate load events emitted from <code>AnalyticsListener</code>.</li> <li>Prevent subtitle &amp; metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (<a href="https://redirect.github.com/google/ExoPlayer/issues/1722">#1722</a>). <ul> <li>In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via <code>onLoadError</code> callbacks.</li> <li>In legacy subtitle handling (during rendering), only associated load errors are emitted via <code>onLoadError</code> callbacks while parse errors are silently ignored (this is pre-existing behaviour).</li> </ul> </li> <li>Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (<a href="https://redirect.github.com/androidx/media/issues/1698">#1698</a>).</li> <li>Add a setter to <code>SntpClient</code> to set the max elapsed time since the last update after which the client is re-initialized (<a href="https://redirect.github.com/androidx/media/pull/1794">#1794</a>).</li> </ul> </li> <li>Transformer:</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/blob/release/RELEASENOTES.md">androidx.media3:media3-exoplayer-hls's changelog</a>.</em></p> <blockquote> <h3>1.5.1 (2024-12-19)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h3>1.5.0 (2024-11-27)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a></li> </ul> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/androidx/media/commit/76088cd6af7f263aba238b7a48d64bd4f060cb8b"><code>76088cd</code></a> Bump Media3 version to 1.5.1</li> <li><a href="https://github.com/androidx/media/commit/7ae9ddf1662b7174a2d82eb14a0f07fc5d7a3e95"><code>7ae9ddf</code></a> Update release notes for Media3 1.5.1 release</li> <li><a href="https://github.com/androidx/media/commit/e4e59cd929af4d80b84d9a392ae82cb4aa07cf0b"><code>e4e59cd</code></a> Switch default of async crypto mode to disabled</li> <li><a href="https://github.com/androidx/media/commit/508a4258a32c4f03ae69721a0609075d9d817b77"><code>508a425</code></a> Switch play FGS exemption to use custom action instead of commands</li> <li><a href="https://github.com/androidx/media/commit/52f976179622c764794859195dbecd6bea4104a4"><code>52f9761</code></a> Don't check codec's profile for MV-HEVC video.</li> <li><a href="https://github.com/androidx/media/commit/de91ebc6ae101cdd4c9e4246cb6840a7962aa38b"><code>de91ebc</code></a> Add vorbis comment support for track/disc numbering fields, and genre</li> <li><a href="https://github.com/androidx/media/commit/5d9badcb502aebc57027ba407959344b55731e9d"><code>5d9badc</code></a> Fix ReplacingCuesResolver.discardCuesBeforeTimeUs to retain active cue</li> <li><a href="https://github.com/androidx/media/commit/121b79ae96e334e79ec0f886fccf81357b9054d0"><code>121b79a</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1943">#1943</a> from DolbyLaboratories:dlb/ac4-ajoc/dev</li> <li><a href="https://github.com/androidx/media/commit/fa9689ef9ad10d97f60b8b9496222ae0e2624cd5"><code>fa9689e</code></a> Clarify <code>CommandButton</code> javadoc around <code>iconResId</code> and <code>ICON_UNDEFINED</code></li> <li><a href="https://github.com/androidx/media/commit/f5bbb39e90ef54e163e716e5b01122d730192503"><code>f5bbb39</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1823">#1823</a> from MGaetan89:remove_outdated_sdk_check</li> <li>Additional commits viewable in <a href="https://github.com/androidx/media/compare/1.4.1...1.5.1">compare view</a></li> </ul> </details> <br /> Updates `androidx.media3:media3-exoplayer-dash` from 1.4.1 to 1.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/releases">androidx.media3:media3-exoplayer-dash's releases</a>.</em></p> <blockquote> <h2>1.5.1</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h2>1.5.0</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a> now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, <a href="https://issuetracker.google.com/345472586#comment7">due to <code>compileSdk = 35</code></a>. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has <a href="http://r.android.com/3156141">already been done in other AndroidX libraries</a>.</li> </ul> </li> <li>ExoPlayer: <ul> <li><code>MediaCodecRenderer.onProcessedStreamChange()</code> can now be called for every media item. Previously it was not called for the first one. Use <code>MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()</code> to enable this.</li> <li>Add <code>PreloadMediaSource.PreloadControl.onPreloadError</code> to allow <code>PreloadMediaSource.PreloadControl</code> implementations to take actions when error occurs.</li> <li>Add <code>BasePreloadManager.Listener</code> to propagate preload events to apps.</li> <li>Allow changing SNTP client timeout and retry alternative addresses on timeout (<a href="https://redirect.github.com/androidx/media/issues/1540">#1540</a>).</li> <li>Remove <code>MediaCodecAdapter.Configuration.flags</code> as the field was always zero.</li> <li>Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).</li> <li>Defer the blocking call to <code>Context.getSystemService(Context.AUDIO_SERVICE)</code> until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (<a href="https://redirect.github.com/androidx/media/pull/1616">#1616</a>).</li> <li>Allow playback regardless of buffered duration when loading fails (<a href="https://redirect.github.com/androidx/media/issues/1571">#1571</a>).</li> <li>Add <code>AnalyticsListener.onRendererReadyChanged()</code> to signal when individual renderers allow playback to be ready.</li> <li>Fix <code>MediaCodec.CryptoException</code> sometimes being reported as an &quot;unexpected runtime error&quot; when <code>MediaCodec</code> is operated in asynchronous mode (default behaviour on API 31+).</li> <li>Pass <code>bufferedDurationUs</code> instead of <code>bufferedPositionUs</code> with <code>PreloadMediaSource.PreloadControl.onContinueLoadingRequested()</code>. Also changes <code>DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS</code> to <code>DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS</code>, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.</li> <li>Add <code>ForwardingRenderer</code> implementation that forwards all method calls to another renderer (<a href="https://redirect.github.com/androidx/media/pull/1703">1703</a>).</li> <li>Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling <code>ExoPlayer.setPreloadConfiguration(PreloadConfiguration)</code> accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, <code>DefaultLoadControl</code> restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing <code>LoadControl.shouldContinuePreloading()</code> accordingly (like when overriding this method in <code>DefaultLoadControl</code>). The default implementation of <code>LoadControl</code> disables preloading in case an app is using a custom implementation of <code>LoadControl</code>.</li> <li>Add method <code>MediaSourceEventListener.EventDispatcher.dispatchEvent()</code> to allow invoking events of subclass listeners (<a href="https://redirect.github.com/androidx/media/pull/1736">1736</a>).</li> <li>Add <code>DefaultPreloadManager.Builder</code> that builds the <code>DefaultPreloadManager</code> and <code>ExoPlayer</code> instances with consistently shared configurations.</li> <li>Remove <code>Renderer[]</code> parameter from <code>LoadControl.onTracksSelected()</code> as <code>DefaultLoadControl</code> implementation can retrieve the stream types from <code>ExoTrackSelection[]</code>.</li> <li>Deprecated <code>DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])</code> and marked method as final to prevent overrides. The new <code>DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])</code> should be used instead.</li> <li>Report <code>MediaSourceEventListener</code> events from secondary sources in <code>MergingMediaSource</code>. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with <code>MediaItem.LocalConfiguration.subtitleConfigurations</code>), which may appear as duplicate load events emitted from <code>AnalyticsListener</code>.</li> <li>Prevent subtitle &amp; metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (<a href="https://redirect.github.com/google/ExoPlayer/issues/1722">#1722</a>). <ul> <li>In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via <code>onLoadError</code> callbacks.</li> <li>In legacy subtitle handling (during rendering), only associated load errors are emitted via <code>onLoadError</code> callbacks while parse errors are silently ignored (this is pre-existing behaviour).</li> </ul> </li> <li>Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (<a href="https://redirect.github.com/androidx/media/issues/1698">#1698</a>).</li> <li>Add a setter to <code>SntpClient</code> to set the max elapsed time since the last update after which the client is re-initialized (<a href="https://redirect.github.com/androidx/media/pull/1794">#1794</a>).</li> </ul> </li> <li>Transformer:</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/blob/release/RELEASENOTES.md">androidx.media3:media3-exoplayer-dash's changelog</a>.</em></p> <blockquote> <h3>1.5.1 (2024-12-19)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h3>1.5.0 (2024-11-27)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a></li> </ul> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/androidx/media/commit/76088cd6af7f263aba238b7a48d64bd4f060cb8b"><code>76088cd</code></a> Bump Media3 version to 1.5.1</li> <li><a href="https://github.com/androidx/media/commit/7ae9ddf1662b7174a2d82eb14a0f07fc5d7a3e95"><code>7ae9ddf</code></a> Update release notes for Media3 1.5.1 release</li> <li><a href="https://github.com/androidx/media/commit/e4e59cd929af4d80b84d9a392ae82cb4aa07cf0b"><code>e4e59cd</code></a> Switch default of async crypto mode to disabled</li> <li><a href="https://github.com/androidx/media/commit/508a4258a32c4f03ae69721a0609075d9d817b77"><code>508a425</code></a> Switch play FGS exemption to use custom action instead of commands</li> <li><a href="https://github.com/androidx/media/commit/52f976179622c764794859195dbecd6bea4104a4"><code>52f9761</code></a> Don't check codec's profile for MV-HEVC video.</li> <li><a href="https://github.com/androidx/media/commit/de91ebc6ae101cdd4c9e4246cb6840a7962aa38b"><code>de91ebc</code></a> Add vorbis comment support for track/disc numbering fields, and genre</li> <li><a href="https://github.com/androidx/media/commit/5d9badcb502aebc57027ba407959344b55731e9d"><code>5d9badc</code></a> Fix ReplacingCuesResolver.discardCuesBeforeTimeUs to retain active cue</li> <li><a href="https://github.com/androidx/media/commit/121b79ae96e334e79ec0f886fccf81357b9054d0"><code>121b79a</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1943">#1943</a> from DolbyLaboratories:dlb/ac4-ajoc/dev</li> <li><a href="https://github.com/androidx/media/commit/fa9689ef9ad10d97f60b8b9496222ae0e2624cd5"><code>fa9689e</code></a> Clarify <code>CommandButton</code> javadoc around <code>iconResId</code> and <code>ICON_UNDEFINED</code></li> <li><a href="https://github.com/androidx/media/commit/f5bbb39e90ef54e163e716e5b01122d730192503"><code>f5bbb39</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1823">#1823</a> from MGaetan89:remove_outdated_sdk_check</li> <li>Additional commits viewable in <a href="https://github.com/androidx/media/compare/1.4.1...1.5.1">compare view</a></li> </ul> </details> <br /> Updates `androidx.media3:media3-exoplayer-rtsp` from 1.4.1 to 1.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/releases">androidx.media3:media3-exoplayer-rtsp's releases</a>.</em></p> <blockquote> <h2>1.5.1</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h2>1.5.0</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a> now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, <a href="https://issuetracker.google.com/345472586#comment7">due to <code>compileSdk = 35</code></a>. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has <a href="http://r.android.com/3156141">already been done in other AndroidX libraries</a>.</li> </ul> </li> <li>ExoPlayer: <ul> <li><code>MediaCodecRenderer.onProcessedStreamChange()</code> can now be called for every media item. Previously it was not called for the first one. Use <code>MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()</code> to enable this.</li> <li>Add <code>PreloadMediaSource.PreloadControl.onPreloadError</code> to allow <code>PreloadMediaSource.PreloadControl</code> implementations to take actions when error occurs.</li> <li>Add <code>BasePreloadManager.Listener</code> to propagate preload events to apps.</li> <li>Allow changing SNTP client timeout and retry alternative addresses on timeout (<a href="https://redirect.github.com/androidx/media/issues/1540">#1540</a>).</li> <li>Remove <code>MediaCodecAdapter.Configuration.flags</code> as the field was always zero.</li> <li>Allow the user to select the built-in speaker for playback on Wear OS API 35+ (where the device advertises support for this).</li> <li>Defer the blocking call to <code>Context.getSystemService(Context.AUDIO_SERVICE)</code> until audio focus handling is enabled. This ensures the blocking call isn't done if audio focus handling is not enabled (<a href="https://redirect.github.com/androidx/media/pull/1616">#1616</a>).</li> <li>Allow playback regardless of buffered duration when loading fails (<a href="https://redirect.github.com/androidx/media/issues/1571">#1571</a>).</li> <li>Add <code>AnalyticsListener.onRendererReadyChanged()</code> to signal when individual renderers allow playback to be ready.</li> <li>Fix <code>MediaCodec.CryptoException</code> sometimes being reported as an &quot;unexpected runtime error&quot; when <code>MediaCodec</code> is operated in asynchronous mode (default behaviour on API 31+).</li> <li>Pass <code>bufferedDurationUs</code> instead of <code>bufferedPositionUs</code> with <code>PreloadMediaSource.PreloadControl.onContinueLoadingRequested()</code>. Also changes <code>DefaultPreloadManager.Status.STAGE_LOADED_TO_POSITION_MS</code> to <code>DefaultPreloadManager.Status.STAGE_LOADED_FOR_DURATION_MS</code>, apps then need to pass a value representing a specific duration from the default start position for which the corresponding media source has to be preloaded with this IntDef, instead of a position.</li> <li>Add <code>ForwardingRenderer</code> implementation that forwards all method calls to another renderer (<a href="https://redirect.github.com/androidx/media/pull/1703">1703</a>).</li> <li>Add playlist preloading for the next item in the playlist. Apps can enable preloading by calling <code>ExoPlayer.setPreloadConfiguration(PreloadConfiguration)</code> accordingly. By default preloading is disabled. When opted-in and to not interfere with playback, <code>DefaultLoadControl</code> restricts preloading to start and continue only when the player is not loading for playback. Apps can change this behaviour by implementing <code>LoadControl.shouldContinuePreloading()</code> accordingly (like when overriding this method in <code>DefaultLoadControl</code>). The default implementation of <code>LoadControl</code> disables preloading in case an app is using a custom implementation of <code>LoadControl</code>.</li> <li>Add method <code>MediaSourceEventListener.EventDispatcher.dispatchEvent()</code> to allow invoking events of subclass listeners (<a href="https://redirect.github.com/androidx/media/pull/1736">1736</a>).</li> <li>Add <code>DefaultPreloadManager.Builder</code> that builds the <code>DefaultPreloadManager</code> and <code>ExoPlayer</code> instances with consistently shared configurations.</li> <li>Remove <code>Renderer[]</code> parameter from <code>LoadControl.onTracksSelected()</code> as <code>DefaultLoadControl</code> implementation can retrieve the stream types from <code>ExoTrackSelection[]</code>.</li> <li>Deprecated <code>DefaultLoadControl.calculateTargetBufferBytes(Renderer[], ExoTrackSelection[])</code> and marked method as final to prevent overrides. The new <code>DefaultLoadControl.calculateTargetBufferBytes(ExoTrackSelection[])</code> should be used instead.</li> <li>Report <code>MediaSourceEventListener</code> events from secondary sources in <code>MergingMediaSource</code>. This will result in load start/error/cancelled/completed events being reported for sideloaded subtitles (those added with <code>MediaItem.LocalConfiguration.subtitleConfigurations</code>), which may appear as duplicate load events emitted from <code>AnalyticsListener</code>.</li> <li>Prevent subtitle &amp; metadata errors from completely stopping playback. Instead the problematic track is disabled and playback of the remaining tracks continues (<a href="https://redirect.github.com/google/ExoPlayer/issues/1722">#1722</a>). <ul> <li>In new subtitle handling (during extraction), associated parse (e.g. invalid subtitle data) and load errors (e.g. HTTP 404) are emitted via <code>onLoadError</code> callbacks.</li> <li>In legacy subtitle handling (during rendering), only associated load errors are emitted via <code>onLoadError</code> callbacks while parse errors are silently ignored (this is pre-existing behaviour).</li> </ul> </li> <li>Fix bug where playlist items or periods in multi-period DASH streams with durations that don't match the actual content could cause frame freezes at the end of the item (<a href="https://redirect.github.com/androidx/media/issues/1698">#1698</a>).</li> <li>Add a setter to <code>SntpClient</code> to set the max elapsed time since the last update after which the client is re-initialized (<a href="https://redirect.github.com/androidx/media/pull/1794">#1794</a>).</li> </ul> </li> <li>Transformer:</li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/blob/release/RELEASENOTES.md">androidx.media3:media3-exoplayer-rtsp's changelog</a>.</em></p> <blockquote> <h3>1.5.1 (2024-12-19)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h3>1.5.0 (2024-11-27)</h3> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/release/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a></li> </ul> </li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/androidx/media/commit/76088cd6af7f263aba238b7a48d64bd4f060cb8b"><code>76088cd</code></a> Bump Media3 version to 1.5.1</li> <li><a href="https://github.com/androidx/media/commit/7ae9ddf1662b7174a2d82eb14a0f07fc5d7a3e95"><code>7ae9ddf</code></a> Update release notes for Media3 1.5.1 release</li> <li><a href="https://github.com/androidx/media/commit/e4e59cd929af4d80b84d9a392ae82cb4aa07cf0b"><code>e4e59cd</code></a> Switch default of async crypto mode to disabled</li> <li><a href="https://github.com/androidx/media/commit/508a4258a32c4f03ae69721a0609075d9d817b77"><code>508a425</code></a> Switch play FGS exemption to use custom action instead of commands</li> <li><a href="https://github.com/androidx/media/commit/52f976179622c764794859195dbecd6bea4104a4"><code>52f9761</code></a> Don't check codec's profile for MV-HEVC video.</li> <li><a href="https://github.com/androidx/media/commit/de91ebc6ae101cdd4c9e4246cb6840a7962aa38b"><code>de91ebc</code></a> Add vorbis comment support for track/disc numbering fields, and genre</li> <li><a href="https://github.com/androidx/media/commit/5d9badcb502aebc57027ba407959344b55731e9d"><code>5d9badc</code></a> Fix ReplacingCuesResolver.discardCuesBeforeTimeUs to retain active cue</li> <li><a href="https://github.com/androidx/media/commit/121b79ae96e334e79ec0f886fccf81357b9054d0"><code>121b79a</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1943">#1943</a> from DolbyLaboratories:dlb/ac4-ajoc/dev</li> <li><a href="https://github.com/androidx/media/commit/fa9689ef9ad10d97f60b8b9496222ae0e2624cd5"><code>fa9689e</code></a> Clarify <code>CommandButton</code> javadoc around <code>iconResId</code> and <code>ICON_UNDEFINED</code></li> <li><a href="https://github.com/androidx/media/commit/f5bbb39e90ef54e163e716e5b01122d730192503"><code>f5bbb39</code></a> Merge pull request <a href="https://redirect.github.com/androidx/media/issues/1823">#1823</a> from MGaetan89:remove_outdated_sdk_check</li> <li>Additional commits viewable in <a href="https://github.com/androidx/media/compare/1.4.1...1.5.1">compare view</a></li> </ul> </details> <br /> Updates `androidx.media3:media3-exoplayer-smoothstreaming` from 1.4.1 to 1.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/androidx/media/releases">androidx.media3:media3-exoplayer-smoothstreaming's releases</a>.</em></p> <blockquote> <h2>1.5.1</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#150-2024-11-27">1.5.0 release</a>:</p> <ul> <li>ExoPlayer: <ul> <li>Disable use of asynchronous decryption in MediaCodec to avoid reported codec timeout issues with this platform API (<a href="https://redirect.github.com/androidx/media/issues/1641">#1641</a>).</li> </ul> </li> <li>Extractors: <ul> <li>MP3: Don't stop playback early when a <code>VBRI</code> frame's table of contents doesn't cover all the MP3 data in a file (<a href="https://redirect.github.com/androidx/media/issues/1904">#1904</a>).</li> </ul> </li> <li>Video: <ul> <li>Rollback of using <code>MediaCodecAdapter</code> supplied pixel aspect ratio values when provided while processing <code>onOutputFormatChanged</code> (<a href="https://redirect.github.com/androidx/media/pull/1371">#1371</a>).</li> </ul> </li> <li>Text: <ul> <li>Fix bug in <code>ReplacingCuesResolver.discardCuesBeforeTimeUs</code> where the cue active at <code>timeUs</code> (started before but not yet ended) was incorrectly discarded (<a href="https://redirect.github.com/androidx/media/issues/1939">#1939</a>).</li> </ul> </li> <li>Metadata: <ul> <li>Extract disc/track numbering and genre from Vorbis comments into <code>MediaMetadata</code> (<a href="https://redirect.github.com/androidx/media/issues/1958">#1958</a>).</li> </ul> </li> </ul> <h2>1.5.0</h2> <p>This release includes the following changes since the <a href="https://github.com/androidx/media/blob/HEAD/#141-2024-08-23">1.4.1 release</a>:</p> <ul> <li>Common Library: <ul> <li>Add <code>ForwardingSimpleBasePlayer</code> that allows forwarding to another player with small adjustments while ensuring full consistency and listener handling (<a href="https://redirect.github.com/androidx/media/issues/1183">#1183</a>).</li> <li>Replace <code>SimpleBasePlayer.State.playlist</code> by <code>getPlaylist()</code> method.</li> <li>Add override for <code>SimpleBasePlayer.State.Builder.setPlaylist()</code> to directly specify a <code>Timeline</code> and current <code>Tracks</code> and <code>Metadata</code> instead of building a playlist structure.</li> <li>Increase <code>minSdk</code> to 21 (Android Lollipop). This is aligned with all other AndroidX libraries.</li> <li>Add <code>androidx.media3:media3-common-ktx</code> artifact which provides Kotlin-specific functionality built on top of the Common library</li> <li>Add <code>Player.listen</code> suspending extension function to spin a coroutine to listen to <code>Player.Events</code> to the <code>media3-common-ktx</code> library.</li> <li>Remove <code>@DoNotInline</code> annotations from manually out-of-lined inner classes designed to avoid <a href="https://chromium.googlesource.com/chromium/src/+/HEAD/build/android/docs/class_verification_failures.md">runtime class verification failures</a>. Recent versions of <a href="https://developer.android.com/build/shrink-code">R8</a> now automatically out-of-line calls like these to avoid the runtime failures (so the manual out-of-lining is no longer required). All Gradle users of the library must already be a using a version of the Android Gradle Plugin that uses a version of R8 which does this, <a href="https://issuetracker.google.com/345472586#comment7">due to <code>compileSdk = 35</code></a>. Users of the library with non-Gradle build systems will need to ensure their R8-equivalent shrinking/obfuscating step does a similar automatic out-of-lining process in order to avoid runtime class verification failures. This change has <a href="http://r.android.com/3156141">already been done in other AndroidX libraries</a>.</li> </ul> </li> <li>ExoPlayer: <ul> <li><code>MediaCodecRenderer.onProcessedStreamChange()</code> can now be called for every media item. Previously it was not called for the first one. Use <code>MediaCodecRenderer.experimentalEnableProcessedStreamChangedAtStart()</code> to enable this.</li> <li>Add <code>PreloadMediaSource.PreloadControl.onPreloadError</code> to allow <code>PreloadMediaSource.PreloadControl</code> implementations to take actions when error occurs.</li> <li>Add <code>BasePreloadManager.Listener</code> to propagate preload events to apps.</li> <li>Allow changing SNTP client timeout and retry alternative addresses on timeout (<a href="https://redirect.github.com/androidx/media/issues/1540">#1540</a>).</li> <li>Remove <code>MediaCodecAdapter.Configuration.flags</code> as the fie... _Description has been truncated_ > **Note** > Automatic rebases have been disabled on this pull request as it has been…
1 parent 471bfd3 commit 35eaf3e

File tree

5 files changed

+13
-77
lines changed

5 files changed

+13
-77
lines changed

packages/video_player/video_player_android/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.8.8
2+
3+
* * Updates Media3-ExoPlayer to 1.5.1.
4+
15
## 2.8.7
26

37
* Adds note about known issue regarding platform views to the README.

packages/video_player/video_player_android/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ android {
4040
}
4141

4242
dependencies {
43-
def exoplayer_version = "1.4.1"
43+
def exoplayer_version = "1.5.1"
4444
implementation "androidx.media3:media3-exoplayer:${exoplayer_version}"
4545
implementation "androidx.media3:media3-exoplayer-hls:${exoplayer_version}"
4646
implementation "androidx.media3:media3-exoplayer-dash:${exoplayer_version}"

packages/video_player/video_player_android/android/src/main/java/io/flutter/plugins/videoplayer/texture/TextureExoPlayerEventListener.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
package io.flutter.plugins.videoplayer.texture;
66

7-
import android.os.Build;
87
import androidx.annotation.NonNull;
98
import androidx.annotation.OptIn;
109
import androidx.media3.common.Format;
@@ -32,20 +31,7 @@ protected void sendInitialized() {
3231
int width = videoSize.width;
3332
int height = videoSize.height;
3433
if (width != 0 && height != 0) {
35-
if (Build.VERSION.SDK_INT <= 21) {
36-
// On API 21 and below, Exoplayer may not internally handle rotation correction
37-
// and reports it through VideoSize.unappliedRotationDegrees. We may apply it to
38-
// fix the case of upside-down playback.
39-
try {
40-
RotationDegrees unappliedRotation =
41-
RotationDegrees.fromDegrees(videoSize.unappliedRotationDegrees);
42-
rotationCorrection = getRotationCorrectionFromUnappliedRotation(unappliedRotation);
43-
} catch (IllegalArgumentException e) {
44-
// Unapplied rotation other than 0, 90, 180, 270 reported by VideoSize. Because this is
45-
// unexpected, we apply no rotation correction.
46-
rotationCorrection = RotationDegrees.ROTATE_0;
47-
}
48-
} else if (surfaceProducerHandlesCropAndRotation) {
34+
if (surfaceProducerHandlesCropAndRotation) {
4935
// When the SurfaceTexture backend for Impeller is used, the preview should already
5036
// be correctly rotated.
5137
rotationCorrection = RotationDegrees.ROTATE_0;

packages/video_player/video_player_android/android/src/test/java/io/flutter/plugins/videoplayer/TextureExoPlayerEventListenerTest.java

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,13 @@ public class TextureExoPlayerEventListenerTest {
3535

3636
@Rule public MockitoRule initRule = MockitoJUnit.rule();
3737

38-
@Test
39-
@Config(maxSdk = 21)
40-
public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
41-
TextureExoPlayerEventListener eventListener =
42-
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
43-
VideoSize size = new VideoSize(800, 400, 0, 0);
44-
when(mockExoPlayer.getVideoSize()).thenReturn(size);
45-
when(mockExoPlayer.getDuration()).thenReturn(10L);
46-
47-
eventListener.onPlaybackStateChanged(Player.STATE_READY);
48-
verify(mockCallbacks).onInitialized(800, 400, 10L, 0);
49-
}
50-
5138
@Test
5239
@Config(minSdk = 22)
5340
public void
5441
onPlaybackStateChangedReadySendInitialized_whenSurfaceProducerHandlesCropAndRotation() {
5542
TextureExoPlayerEventListener eventListener =
5643
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
57-
VideoSize size = new VideoSize(800, 400, 0, 0);
44+
VideoSize size = new VideoSize(800, 400, 0);
5845
when(mockExoPlayer.getVideoSize()).thenReturn(size);
5946
when(mockExoPlayer.getDuration()).thenReturn(10L);
6047

@@ -68,7 +55,7 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
6855
onPlaybackStateChangedReadySendInitializedWithRotationCorrectionAndWidthAndHeightSwap_whenSurfaceProducerDoesNotHandleCropAndRotation() {
6956
TextureExoPlayerEventListener eventListener =
7057
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, false);
71-
VideoSize size = new VideoSize(800, 400, 0, 0);
58+
VideoSize size = new VideoSize(800, 400, 0);
7259
int rotationCorrection = 90;
7360
Format videoFormat = new Format.Builder().setRotationDegrees(rotationCorrection).build();
7461

@@ -80,27 +67,13 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
8067
verify(mockCallbacks).onInitialized(800, 400, 10L, rotationCorrection);
8168
}
8269

83-
@Test
84-
@Config(maxSdk = 21)
85-
public void
86-
onPlaybackStateChangedReadyInPortraitMode90DegreesSwapWidthAndHeight_belowAndroid21() {
87-
TextureExoPlayerEventListener eventListener =
88-
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
89-
VideoSize size = new VideoSize(800, 400, 90, 0);
90-
when(mockExoPlayer.getVideoSize()).thenReturn(size);
91-
when(mockExoPlayer.getDuration()).thenReturn(10L);
92-
93-
eventListener.onPlaybackStateChanged(Player.STATE_READY);
94-
verify(mockCallbacks).onInitialized(800, 400, 10L, 0);
95-
}
96-
9770
@Test
9871
@Config(minSdk = 22)
9972
public void
10073
onPlaybackStateChangedReadyInPortraitMode90DegreesDoesNotSwapWidthAndHeight_whenSurfaceProducerHandlesCropAndRotation() {
10174
TextureExoPlayerEventListener eventListener =
10275
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
103-
VideoSize size = new VideoSize(800, 400, 90, 0);
76+
VideoSize size = new VideoSize(800, 400, 0);
10477

10578
when(mockExoPlayer.getVideoSize()).thenReturn(size);
10679
when(mockExoPlayer.getDuration()).thenReturn(10L);
@@ -115,7 +88,7 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
11588
onPlaybackStateChangedReadyInPortraitMode90DegreesSwapWidthAndHeight_whenSurfaceProducerDoesNotHandleCropAndRotation() {
11689
TextureExoPlayerEventListener eventListener =
11790
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, false);
118-
VideoSize size = new VideoSize(800, 400, 0, 0);
91+
VideoSize size = new VideoSize(800, 400, 0);
11992
int rotationCorrection = 90;
12093
Format videoFormat = new Format.Builder().setRotationDegrees(rotationCorrection).build();
12194

@@ -127,27 +100,13 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
127100
verify(mockCallbacks).onInitialized(800, 400, 10L, 90);
128101
}
129102

130-
@Test
131-
@Config(maxSdk = 21)
132-
public void
133-
onPlaybackStateChangedReadyInPortraitMode270DegreesSwapWidthAndHeight_belowAndroid21() {
134-
TextureExoPlayerEventListener eventListener =
135-
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
136-
VideoSize size = new VideoSize(800, 400, 270, 0);
137-
when(mockExoPlayer.getVideoSize()).thenReturn(size);
138-
when(mockExoPlayer.getDuration()).thenReturn(10L);
139-
140-
eventListener.onPlaybackStateChanged(Player.STATE_READY);
141-
verify(mockCallbacks).onInitialized(800, 400, 10L, 0);
142-
}
143-
144103
@Test
145104
@Config(minSdk = 22)
146105
public void
147106
onPlaybackStateChangedReadyInPortraitMode270DegreesDoesNotSwapWidthAndHeight_whenSurfaceProducerHandlesCropAndRotation() {
148107
TextureExoPlayerEventListener eventListener =
149108
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
150-
VideoSize size = new VideoSize(800, 400, 270, 0);
109+
VideoSize size = new VideoSize(800, 400, 0);
151110
when(mockExoPlayer.getVideoSize()).thenReturn(size);
152111
when(mockExoPlayer.getDuration()).thenReturn(10L);
153112

@@ -161,7 +120,7 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
161120
onPlaybackStateChangedReadyInPortraitMode270DegreesDoesNotSwapWidthAndHeight_whenSurfaceProducerDoesNotHandleCropAndRotation() {
162121
TextureExoPlayerEventListener eventListener =
163122
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, false);
164-
VideoSize size = new VideoSize(800, 400, 0, 0);
123+
VideoSize size = new VideoSize(800, 400, 0);
165124
int rotationCorrection = 270;
166125
Format videoFormat = new Format.Builder().setRotationDegrees(rotationCorrection).build();
167126

@@ -172,17 +131,4 @@ public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
172131
eventListener.onPlaybackStateChanged(Player.STATE_READY);
173132
verify(mockCallbacks).onInitialized(800, 400, 10L, 270);
174133
}
175-
176-
@Test
177-
@Config(maxSdk = 21)
178-
public void onPlaybackStateChangedReadyFlipped180DegreesInformEventHandler_belowAndroid21() {
179-
TextureExoPlayerEventListener eventListener =
180-
new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks, true);
181-
VideoSize size = new VideoSize(800, 400, 180, 0);
182-
when(mockExoPlayer.getVideoSize()).thenReturn(size);
183-
when(mockExoPlayer.getDuration()).thenReturn(10L);
184-
185-
eventListener.onPlaybackStateChanged(Player.STATE_READY);
186-
verify(mockCallbacks).onInitialized(800, 400, 10L, 180);
187-
}
188134
}

packages/video_player/video_player_android/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: video_player_android
22
description: Android implementation of the video_player plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22
5-
version: 2.8.7
5+
version: 2.8.8
66

77
environment:
88
sdk: ^3.7.0

0 commit comments

Comments
 (0)