mirror of
https://github.com/janishutz/MusicPlayer.git
synced 2026-09-10 14:25:24 +02:00
feat: improve sync
This commit is contained in:
@@ -6,6 +6,8 @@ import {
|
||||
currentQueue,
|
||||
currentQueueIdx,
|
||||
isPlaying,
|
||||
playbackOffset,
|
||||
playbackTime,
|
||||
startTime
|
||||
} from './state';
|
||||
import type {
|
||||
@@ -40,6 +42,8 @@ const connect = (): Promise<void> => {
|
||||
currentQueueIdx.value = data.state.index;
|
||||
isPlaying.value = data.state.playing;
|
||||
startTime.value = data.state.start;
|
||||
playbackTime.value = data.state.offset;
|
||||
playbackOffset.value = data.state.offset;
|
||||
|
||||
resolve();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user