mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
Move query parameters to request body in SyncPlay
This commit is contained in:
parent
bbef2197dd
commit
308deaceba
@ -72,7 +72,7 @@ class Controller {
|
||||
const sendPlayRequest = (items) => {
|
||||
const queue = items.map(item => item.Id);
|
||||
apiClient.requestSyncPlayPlay({
|
||||
PlayingQueue: queue.join(','),
|
||||
PlayingQueue: queue,
|
||||
PlayingItemPosition: options.startIndex ? options.startIndex : 0,
|
||||
StartPositionTicks: options.startPositionTicks ? options.startPositionTicks : 0
|
||||
});
|
||||
@ -135,7 +135,7 @@ class Controller {
|
||||
Helper.translateItemsForPlayback(apiClient, options.items, options).then((items) => {
|
||||
const itemIds = items.map(item => item.Id);
|
||||
apiClient.requestSyncPlayQueue({
|
||||
ItemIds: itemIds.join(','),
|
||||
ItemIds: itemIds,
|
||||
Mode: mode
|
||||
});
|
||||
});
|
||||
@ -146,7 +146,7 @@ class Controller {
|
||||
Helper.translateItemsForPlayback(apiClient, result.Items, options).then((items) => {
|
||||
const itemIds = items.map(item => item.Id);
|
||||
apiClient.requestSyncPlayQueue({
|
||||
ItemIds: itemIds.join(','),
|
||||
ItemIds: itemIds,
|
||||
Mode: mode
|
||||
});
|
||||
});
|
||||
|
@ -129,14 +129,19 @@ class PlaybackCore {
|
||||
const now = this.timeSyncCore.localDateToRemote(currentTime);
|
||||
const playlistItemId = this.manager.getQueueCore().getCurrentPlaylistItemId();
|
||||
|
||||
const apiClient = this.manager.getApiClient();
|
||||
apiClient.requestSyncPlayBuffering({
|
||||
const options = {
|
||||
When: now.toISOString(),
|
||||
PositionTicks: currentPositionTicks,
|
||||
IsPlaying: isPlaying,
|
||||
PlaylistItemId: playlistItemId,
|
||||
BufferingDone: !isBuffering
|
||||
});
|
||||
PlaylistItemId: playlistItemId
|
||||
};
|
||||
|
||||
const apiClient = this.manager.getApiClient();
|
||||
if (isBuffering) {
|
||||
apiClient.requestSyncPlayBuffering(options);
|
||||
} else {
|
||||
apiClient.requestSyncPlayReady(options);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,12 +176,11 @@ class QueueCore {
|
||||
const currentPositionTicks = Math.round(currentPosition * Helper.TicksPerMillisecond);
|
||||
const isPlaying = playerWrapper.isPlaying();
|
||||
|
||||
apiClient.requestSyncPlayBuffering({
|
||||
apiClient.requestSyncPlayReady({
|
||||
When: now.toISOString(),
|
||||
PositionTicks: currentPositionTicks,
|
||||
IsPlaying: isPlaying,
|
||||
PlaylistItemId: this.getCurrentPlaylistItemId(),
|
||||
BufferingDone: true
|
||||
PlaylistItemId: this.getCurrentPlaylistItemId()
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.error('Error while waiting for `playbackstart` event!', origin, error);
|
||||
|
Loading…
Reference in New Issue
Block a user