From 6da354a92efc1a8b87c15ac3ca594587ce469d92 Mon Sep 17 00:00:00 2001 From: thornbill Date: Fri, 17 May 2024 13:52:46 -0400 Subject: [PATCH] Backport pull request #5518 from jellyfin-web/release-10.9.z Fix syncplay playback starting before listener created Original-merge: 25b1bcab503fa32efcd70a6a9a8e3901ca693107 Merged-by: thornbill Backported-by: Joshua M. Boniface --- src/plugins/syncPlay/core/QueueCore.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/syncPlay/core/QueueCore.js b/src/plugins/syncPlay/core/QueueCore.js index 721ed7403a..d34f778840 100644 --- a/src/plugins/syncPlay/core/QueueCore.js +++ b/src/plugins/syncPlay/core/QueueCore.js @@ -227,14 +227,14 @@ class QueueCore { const serverId = apiClient.serverInfo().Id; + this.scheduleReadyRequestOnPlaybackStart(apiClient, 'startPlayback'); + const playerWrapper = this.manager.getPlayerWrapper(); playerWrapper.localPlay({ ids: this.getPlaylistAsItemIds(), startPositionTicks: startPositionTicks, startIndex: this.getCurrentPlaylistIndex(), serverId: serverId - }).then(() => { - this.scheduleReadyRequestOnPlaybackStart(apiClient, 'startPlayback'); }).catch((error) => { console.error(error); toast(globalize.translate('MessageSyncPlayErrorMedia'));