diff --git a/src/components/syncPlay/groupSelectionMenu.js b/src/components/syncPlay/groupSelectionMenu.js index 48b22261f4..3c77a67ea5 100644 --- a/src/components/syncPlay/groupSelectionMenu.js +++ b/src/components/syncPlay/groupSelectionMenu.js @@ -37,7 +37,7 @@ function showNewJoinGroupSelection (button, user, apiClient) { console.debug('No item is currently playing.'); } - apiClient.sendSyncPlayCommand('ListGroups').then(function (response) { + apiClient.getSyncPlayGroups().then(function (response) { response.json().then(function (groups) { var menuItems = groups.map(function (group) { return { @@ -83,9 +83,9 @@ function showNewJoinGroupSelection (button, user, apiClient) { actionsheet.show(menuOptions).then(function (id) { if (id == 'new-group') { - apiClient.sendSyncPlayCommand('NewGroup'); + apiClient.createSyncPlayGroup(); } else { - apiClient.sendSyncPlayCommand('JoinGroup', { + apiClient.joinSyncPlayGroup({ GroupId: id, PlayingItemId: playingItemId }); @@ -140,7 +140,7 @@ function showLeaveGroupSelection (button, user, apiClient) { actionsheet.show(menuOptions).then(function (id) { if (id == 'leave-group') { - apiClient.sendSyncPlayCommand('LeaveGroup'); + apiClient.leaveSyncPlayGroup(); } }).catch((error) => { console.error('SyncPlay: unexpected error showing group menu:', error); diff --git a/src/components/syncPlay/syncPlayManager.js b/src/components/syncPlay/syncPlayManager.js index 860e3edcd4..c847fbaede 100644 --- a/src/components/syncPlay/syncPlayManager.js +++ b/src/components/syncPlay/syncPlayManager.js @@ -139,7 +139,7 @@ class SyncPlayManager { return; } - apiClient.sendSyncPlayCommand('UpdatePing', { + apiClient.sendSyncPlayPing({ Ping: ping }); } @@ -447,7 +447,7 @@ class SyncPlayManager { if (!success) { console.warning('Error reporting playback state to server. Joining group will fail.'); } - apiClient.sendSyncPlayCommand('JoinGroup', { + apiClient.joinSyncPlayGroup({ GroupId: groupId, PlayingItemId: playingItemId }); @@ -658,7 +658,7 @@ class SyncPlayManager { */ playRequest (player) { var apiClient = connectionManager.currentApiClient(); - apiClient.sendSyncPlayCommand('PlayRequest'); + apiClient.requestSyncPlayStart(); } /** @@ -666,7 +666,7 @@ class SyncPlayManager { */ pauseRequest (player) { var apiClient = connectionManager.currentApiClient(); - apiClient.sendSyncPlayCommand('PauseRequest'); + apiClient.requestSyncPlayPause(); // Pause locally as well, to give the user some little control playbackManager._localUnpause(player); } @@ -676,7 +676,7 @@ class SyncPlayManager { */ seekRequest (PositionTicks, player) { var apiClient = connectionManager.currentApiClient(); - apiClient.sendSyncPlayCommand('SeekRequest', { + apiClient.requestSyncPlaySeek({ PositionTicks: PositionTicks }); } diff --git a/yarn.lock b/yarn.lock index 68ce5874a8..da80c73e6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6309,9 +6309,9 @@ isurl@^1.0.0-alpha5: is-object "^1.0.1" jellyfin-apiclient@^1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/jellyfin-apiclient/-/jellyfin-apiclient-1.3.1.tgz#7ecaa986dbb6e36cce9d8f94dd66619419afa32d" - integrity sha512-PQUKFDcQOy4hJ43Jc3Lm3571zONlTjr2qmr6pEVcfLZs7Lvwa4oUu/yonH6MMxpjZOvTbcirjer+XXgF2RwXyA== + version "1.4.0" + resolved "https://registry.yarnpkg.com/jellyfin-apiclient/-/jellyfin-apiclient-1.4.0.tgz#d8fedc88cc177597290687be31e38de3cd0d035a" + integrity sha512-v2lcSZwcbKh3YSrZkBwNM7tisxvUJHZawz0xpxIobEI6MHrQLo4oDdm1zHXN6Mku9uzbuBpbAV1tA6XJwVVTyA== "jellyfin-noto@https://github.com/jellyfin/jellyfin-noto": version "1.0.3"