Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-27 14:23:11 +08:00
parent 032dfd69be
commit c3d3fa67f7

View File

@@ -299,14 +299,14 @@ class AudioController extends GetxController
playNext(); playNext();
break; break;
case PlayRepeat.singleCycle: case PlayRepeat.singleCycle:
player?.play(); _replay();
break; break;
case PlayRepeat.listCycle: case PlayRepeat.listCycle:
if (!playNext()) { if (!playNext()) {
if (index != null && index != 0 && playlist != null) { if (index != null && index != 0 && playlist != null) {
playIndex(0); playIndex(0);
} else { } else {
player?.play(); _replay();
} }
} }
break; break;
@@ -318,6 +318,10 @@ class AudioController extends GetxController
}; };
} }
void _replay() {
player?.seek(Duration.zero).whenComplete(player!.play);
}
@override @override
Future<void> actionLikeVideo() async { Future<void> actionLikeVideo() async {
if (!isLogin) { if (!isLogin) {