feat(player): add repeat off/all/one modes

The internal player handles setRepeatMode: repeat-one replays the
current track, repeat-all wraps the queue (and keeps a single-track
shuffle queue alive). The mode is broadcast in playback state,
persisted with the playback session, and toggleable from the Now
Playing transport row and the up-next sheet; a small shuffle toggle
joins the transport row for symmetry.
This commit is contained in:
zarzet
2026-07-26 19:00:50 +07:00
parent 11fb4365a2
commit 8d077ae2da
3 changed files with 112 additions and 0 deletions
+3
View File
@@ -102,6 +102,9 @@ class MusicPlayerController {
);
}
Future<void> setRepeatMode(AudioServiceRepeatMode mode) async =>
_handler?.setRepeatMode(mode);
Future<void> playNext(PlayableMedia item) async =>
(await ensureInitialized())?.enqueue(item, playNext: true);