Skip to content

build: migrate Android playback from ExoPlayer 2 to Media3 - #1

Merged
victorrss merged 1 commit into
mainfrom
build.migrate-android-media3
Aug 18, 2026
Merged

build: migrate Android playback from ExoPlayer 2 to Media3#1
victorrss merged 1 commit into
mainfrom
build.migrate-android-media3

Conversation

@victorrss

@victorrss victorrss commented Aug 17, 2026

Copy link
Copy Markdown
Member

Description

Standalone ExoPlayer 2 is discontinued. Android playback now uses Media3 ExoPlayer 1.11.0. The Dart PlayerController API is unchanged. Plugin minSdk is aligned to 23 (already documented) and compileSdk is 36 (required by Media3 1.11.0). Host apps must compile against API 36.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

There are no Android instrumented tests in this repo. Verified with flutter build apk --debug. Gradle no longer resolves com.google.android.exoplayer2.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a 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.

Copilot AI lite review requested due to automatic review settings August 17, 2026 21:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.1 with androidx.media3:media3-exoplayer:1.11.0.
  • Update Android playback listener API usage (onPlayerStateChangedonPlaybackStateChanged) and add @OptIn(UnstableApi::class) for Media3 lint.
  • Align Android compileSdk to 36 and minSdk to 23, and document the compileSdk requirement 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.

Comment thread android/src/main/kotlin/com/simform/audio_waveforms/AudioPlayer.kt
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
victorrss force-pushed the build.migrate-android-media3 branch from 3774bd7 to 05bb313 Compare August 17, 2026 21:14
@victorrss
victorrss merged commit 11e0cab into main Aug 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Android playback from ExoPlayer 2 to Media3

4 participants