From dd0bf8b4936aa10263abb6583d9c5216e68ec90b Mon Sep 17 00:00:00 2001 From: 1xDed Date: Fri, 27 Nov 2026 14:34:50 +0300 Subject: [PATCH] fix: actually apply the transferred audio position The loadedmetadata handler still only updated media session state; seek to the remote PositionTicks before that. --- src/components/playback/audioPlayer/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/playback/audioPlayer/index.tsx b/src/components/playback/audioPlayer/index.tsx index 31557e8..d8cdf70 100644 --- a/src/components/playback/audioPlayer/index.tsx +++ b/src/components/playback/audioPlayer/index.tsx @@ -237,7 +237,14 @@ const AudioPlayer = () => { onPlay={onPlay} onPause={onPause} onSeeked={updatePositionState} - onLoadedMetadata={updatePositionState} + onLoadedMetadata={(event) => { + const player = event.currentTarget; + if (!seekAppliedRef.current && startTimeTicks > 0) { + seekAppliedRef.current = true; + player.currentTime = ticksToSec(startTimeTicks); + } + updatePositionState(); + }} id="audio-player" />