From 5ca4694c2bb992a49bb0c912a5d07cf3e37419e5 Mon Sep 17 00:00:00 2001 From: 1xDed Date: Fri, 27 Nov 2026 14:19:00 +0300 Subject: [PATCH] fix: transfer starts at the remote position Audio transferred from another session now seeks to the remote PositionTicks after metadata loads instead of always starting at 0. Also surface sessions without an active control channel in the remote dialog. --- src/components/playback/audioPlayer/index.tsx | 20 ++++++++++++------- src/components/remoteControl/index.tsx | 10 ++++++++++ src/utils/methods/transferPlayback.ts | 3 +-- src/utils/store/audioPlayback.ts | 9 +++++++-- 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/components/playback/audioPlayer/index.tsx b/src/components/playback/audioPlayer/index.tsx index b49029e..31557e8 100644 --- a/src/components/playback/audioPlayer/index.tsx +++ b/src/components/playback/audioPlayer/index.tsx @@ -28,13 +28,19 @@ const AudioPlayer = () => { const location = useLocation(); const audioRef = useRef(null); - const [url, display, item, volume, isMuted] = useAudioPlayback((state) => [ - state.url, - state.display, - state.item, - state.player.volume, - state.player.isMuted, - ]); + const [url, display, item, volume, isMuted, startTimeTicks] = + useAudioPlayback((state) => [ + state.url, + state.display, + state.item, + state.player.volume, + state.player.isMuted, + state.startTimeTicks, + ]); + const seekAppliedRef = useRef(false); + useEffect(() => { + seekAppliedRef.current = false; + }, [item?.Id]); const [tracks, currentTrack] = useQueue((state) => [ state.tracks, diff --git a/src/components/remoteControl/index.tsx b/src/components/remoteControl/index.tsx index f50f28d..c167bad 100644 --- a/src/components/remoteControl/index.tsx +++ b/src/components/remoteControl/index.tsx @@ -223,6 +223,16 @@ const RemoteControlDialog = () => { .filter(Boolean) .join(" · ")} + {session.SupportsRemoteControl === false && ( + + No active control channel (WebSocket) — check the + reverse proxy. + + )} {item && (