fix: actually apply the transferred audio position
Continuous Integration / build_web (push) Failing after 0s
Continuous Integration / build (macos-latest) (push) Skipped
Continuous Integration / build (ubuntu-22.04) (push) Skipped
Continuous Integration / build (windows-11-arm) (push) Skipped
Continuous Integration / build (windows-latest) (push) Skipped
Continuous Integration / nightly_release (push) Skipped

The loadedmetadata handler still only updated media session state; seek to the
remote PositionTicks before that.
This commit is contained in:
1xDed committed 2026-11-27 14:34:50 +03:00
1 parent 5ca4694c2b
commit dd0bf8b493
1 file changed
+8 -1
@@ -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"
/>