build: migrate Android playback from ExoPlayer 2 to Media3 - #1
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the Android native playback implementation from deprecated standalone ExoPlayer 2 to AndroidX Media3 ExoPlayer, while keeping the public Dart PlayerController API unchanged. This aligns the plugin’s Android build configuration and documentation with Media3 requirements.
Changes:
- Replace Android dependency
com.google.android.exoplayer:exoplayer:2.17.1withandroidx.media3:media3-exoplayer:1.11.0. - Update Android playback listener API usage (
onPlayerStateChanged→onPlaybackStateChanged) and add@OptIn(UnstableApi::class)for Media3 lint. - Align Android
compileSdkto 36 andminSdkto 23, and document thecompileSdkrequirement for consumers.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
android/build.gradle |
Bumps compileSdk/minSdk and swaps ExoPlayer 2 dependency to Media3. |
android/src/main/kotlin/com/simform/audio_waveforms/AudioPlayer.kt |
Updates imports and playback state listener to Media3 Player.Listener API. |
example/android/app/build.gradle |
Updates example app compileSdk to 36 to match plugin/Media3 requirements. |
doc/documentation.md |
Documents host app compileSdk 36+ requirement due to Media3. |
CHANGELOG.md |
Records the migration as an unreleased changelog entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
reenanalves
approved these changes
Aug 17, 2026
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
force-pushed
the
build.migrate-android-media3
branch
from
August 17, 2026 21:14
3774bd7 to
05bb313
Compare
jihadchama-nu
approved these changes
Aug 17, 2026
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). Host apps must compile against API 36.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 --debug. Gradle no longer resolvescom.google.android.exoplayer2.Breaking Change?
Host apps must use
compileSdk 36+. That is a consumer Gradle constraint, not a Dart API break.Related Issues
Closes #509
Same change as upstream PR #510.