1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Update session ping

This commit is contained in:
gion 2020-04-17 13:42:46 +02:00
parent 5342b90a56
commit 9839dcd02a
2 changed files with 21 additions and 1 deletions

View file

@ -99,6 +99,7 @@
"src/components/scrollManager.js",
"src/components/syncplay/playbackPermissionManager.js",
"src/components/syncplay/groupSelectionMenu.js",
"src/components/syncplay/timeSyncManager.js",
"src/components/syncplay/syncplayManager.js",
"src/scripts/dfnshelper.js",
"src/scripts/dom.js",

View file

@ -108,6 +108,25 @@ class SyncplayManager {
events.trigger(this, "SyncplayReady");
this.notifySyncplayReady = false;
}
// Report ping
if (this.syncEnabled) {
const apiClient = connectionManager.currentApiClient();
const sessionId = getActivePlayerId();
if (!sessionId) {
this.signalError();
toast({
// TODO: translate
text: "Syncplay error occured."
});
return;
}
apiClient.sendSyncplayCommand(sessionId, "UpdatePing", {
Ping: ping
});
}
});
}