refactor: switch to libmpv-android fork, fix ANR and track selection

This commit is contained in:
edde746
2026-03-21 08:53:08 +01:00
parent 09ff47e19f
commit d355e07e10
6 changed files with 277 additions and 470 deletions
+4 -1
View File
@@ -39,7 +39,10 @@ class PlayerAndroid extends PlayerBase {
void handlePlayerEvent(String name, Map? data) {
// Handle Android-specific events
if (name == 'backend-switched') {
// Native player switched from ExoPlayer to MPV due to unsupported format
// Native player switched from ExoPlayer to MPV due to unsupported format.
// Clear stale ExoPlayer tracks so applyTrackSelectionWhenReady waits for
// mpv's track-list instead of immediately applying with ExoPlayer IDs.
clearTracks();
backendSwitchedController.add(null);
return;
}