feat(player): 新增卡片式播放器

This commit is contained in:
Zhou Weidong committed 2026-10-19 15:16:40 +08:00
1 parent ec163f905d
commit 689063a694
6 files changed
+1229 -4

No files matched your search

+12
View File
@@ -531,6 +531,18 @@ class PlayerLogic extends ChangeNotifier {
: null;
}
bool get hasNextEpisode => nextVisibleIndex(session.currentIndex) != null;
Future<void> playNextEpisode() async {
final next = nextVisibleIndex(session.currentIndex);
if (next == null || !pages.hasClients) return;
await pages.animateToPage(
visibleIndices.indexOf(next),
duration: const Duration(milliseconds: 250),
curve: Curves.easeOutCubic,
);
}
void beginScrub(VideoPlayerPort player) {
if (session.active != player) return;
scrubbingPlayer = player;