mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-02-16 14:29:35 +00:00
播放器重写的stream改名
This commit is contained in:
parent
05bc0cde74
commit
e44144b229
6 changed files with 14 additions and 13 deletions
|
|
@ -17,10 +17,10 @@ class SkipStartEnd {
|
|||
_subscriptions.add(
|
||||
player.currentIndexStream.listen((index) {
|
||||
if (_index != index && player.position.inMilliseconds < 500) {
|
||||
_index = index!;
|
||||
Future.microtask(() {
|
||||
player.seek(start);
|
||||
});
|
||||
_index = index!;
|
||||
}
|
||||
}),
|
||||
);
|
||||
|
|
@ -31,8 +31,11 @@ class SkipStartEnd {
|
|||
if (player.duration != null &&
|
||||
player.duration!.inMilliseconds - player.position.inMilliseconds <
|
||||
end.inMilliseconds) {
|
||||
Future.microtask(() {
|
||||
throttler.call(player.seekForward);
|
||||
throttler.call(() {
|
||||
print('跳过片尾');
|
||||
Future.microtask(() {
|
||||
throttler.call(player.seekToNext);
|
||||
});
|
||||
});
|
||||
}
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue