This commit is contained in:
rang 2025-10-31 17:58:37 +08:00
parent 89b9925e34
commit 779c132a11
4 changed files with 796 additions and 745 deletions

View file

@ -169,7 +169,7 @@ class AudiobookPlayer extends AudioPlayer {
return stop();
}
if (_currentIndex != 0 && index == _currentIndex) {
if (initialPosition != null && initialPosition <= position) {
if (initialPosition != null) {
seek(initialPosition);
}
return;

View file

@ -228,10 +228,10 @@ class AudiobookChapterProgressBar extends HookConsumerWidget {
: currentChapter.end - currentChapter.start,
// ! TODO add onSeek
onSeek: (duration) {
// player.seekInBook(
// duration + (currentChapter?.start ?? const Duration(seconds: 0)),
// );
player.seek(duration);
player.seekInBook(
duration + (currentChapter?.start ?? const Duration(seconds: 0)),
);
// player.seek(duration);
},
thumbRadius: 8,
buffered: