mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-10 07:50:28 -07:00
feat: Sync offline/online playback when able (#431)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
15ac3566e2
commit
092836328f
42 changed files with 1002 additions and 497 deletions
|
|
@ -244,10 +244,10 @@ class MediaControlsWrapper extends BaseAudioHandler {
|
|||
final position = _player?.lastState.position;
|
||||
final totalDuration = _player?.lastState.duration;
|
||||
|
||||
//Small delay so we don't post right after playback/progress update
|
||||
// //Small delay so we don't post right after playback/progress update
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
|
||||
ref.read(playBackModel)?.playbackStopped(position ?? Duration.zero, totalDuration, ref);
|
||||
await ref.read(playBackModel)?.playbackStopped(position ?? Duration.zero, totalDuration, ref);
|
||||
ref.read(mediaPlaybackProvider.notifier).update((state) => state.copyWith(position: Duration.zero));
|
||||
|
||||
smtc?.setPlaybackStatus(PlaybackStatus.stopped);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue