build: ⬆️ Migrate Android playback from ExoPlayer 2 to Media3 - #510
Open
victorrss wants to merge 4 commits into
Open
build: ⬆️ Migrate Android playback from ExoPlayer 2 to Media3#510victorrss wants to merge 4 commits into
victorrss wants to merge 4 commits into
Conversation
Replace discontinued ExoPlayer 2.17.1 with Media3 1.11.0 so Android playback stays on a supported library. Co-authored-by: Cursor <cursoragent@cursor.com>
victorrss
commented
Aug 13, 2026
| import androidx.media3.exoplayer.ExoPlayer | ||
| import io.flutter.plugin.common.MethodChannel | ||
|
|
||
| @OptIn(UnstableApi::class) |
Author
There was a problem hiding this comment.
@OptIn(UnstableApi::class) is required because Media3 marks ExoPlayer.Builder as @UnstableApi. That is a binary-compatibility marker, not a quality warning — this surface has the same stability ExoPlayer 2 had for its whole API. Without the opt-in, Android lint fails the build (UnsafeOptInUsageError). See the Media3 migration guide.
Host apps must compile against API 36 because Media3 1.11.0 rejects lower compileSdk values. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the changelog on a patch release instead of the unreleased 2.1.0 section. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Media3 on the existing unreleased 2.1.0 heading instead of a 2.0.3 patch. Co-authored-by: Cursor <cursoragent@cursor.com>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Standalone ExoPlayer 2 is discontinued. Android playback now uses Media3 ExoPlayer 1.11.0. The Dart
PlayerControllerAPI is unchanged. PluginminSdkis aligned to 23 (already documented) andcompileSdkis 36 (required by Media3 1.11.0).Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.There are no Android instrumented tests in this repo. Verified with
flutter build apk --debugand by running the example app on an Android emulator (local MP3 prepare/play/pause). Gradle no longer resolvescom.google.android.exoplayer2.Android setup docs now require
compileSdk 36. The example appcompileSdkis updated to match. No Dart API or dartdoc changes.Breaking Change?
Related Issues
Closes #509