增加跳过片头片尾,上一章下一章移动到AudioPlayer对象中

This commit is contained in:
rang 2025-10-24 11:47:50 +08:00
parent e06c834d0e
commit 620a1eb7a2
29 changed files with 1080 additions and 179 deletions

View file

@ -509,6 +509,7 @@ Future<void> libraryItemPlayButtonOnPressed({
}) async {
appLogger.info('Pressed play/resume button');
final player = ref.watch(audiobookPlayerProvider);
// final bookSettings = ref.watch(bookSettingsProvider(book.libraryItemId));
final isCurrentBookSetInPlayer = player.book == book;
final isPlayingThisBook = player.playing && isCurrentBookSetInPlayer;
@ -554,6 +555,7 @@ Future<void> libraryItemPlayButtonOnPressed({
? bookPlayerSettings.preferredDefaultSpeed ?? appPlayerSettings.preferredDefaultSpeed
: appPlayerSettings.preferredDefaultSpeed,
),
// player.setClip(start: Duration(seconds: 10)),
]);
// toggle play/pause