aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/assets/player/shared/stats/stats-card.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/client/src/assets/player/shared/stats/stats-card.ts b/client/src/assets/player/shared/stats/stats-card.ts
index fad68cec9..077c900e5 100644
--- a/client/src/assets/player/shared/stats/stats-card.ts
+++ b/client/src/assets/player/shared/stats/stats-card.ts
@@ -273,6 +273,8 @@ class StatsCard extends Component {
273 colorSpace?: string 273 colorSpace?: string
274 }) { 274 }) {
275 const { playerNetworkInfo, progress, colorSpace, codecs, resolution, buffer, latency } = options 275 const { playerNetworkInfo, progress, colorSpace, codecs, resolution, buffer, latency } = options
276 const { downloadedFromServer, downloadedFromPeers } = playerNetworkInfo
277
276 const player = this.player() 278 const player = this.player()
277 279
278 const videoQuality: VideoPlaybackQuality = player.getVideoPlaybackQuality() 280 const videoQuality: VideoPlaybackQuality = player.getVideoPlaybackQuality()
@@ -291,10 +293,14 @@ class StatsCard extends Component {
291 ? `${playerNetworkInfo.downloadSpeed} ⇓ / ${playerNetworkInfo.uploadSpeed} ⇑` 293 ? `${playerNetworkInfo.downloadSpeed} ⇓ / ${playerNetworkInfo.uploadSpeed} ⇑`
292 : undefined 294 : undefined
293 295
294 const totalTransferred = playerNetworkInfo.totalDownloaded 296 let totalTransferred = playerNetworkInfo.totalDownloaded
295 ? `${playerNetworkInfo.totalDownloaded} ⇓ / ${playerNetworkInfo.totalUploaded} ⇑` 297 ? `${playerNetworkInfo.totalDownloaded} ⇓`
296 : undefined 298 : ''
297 const { downloadedFromServer, downloadedFromPeers } = playerNetworkInfo 299
300 if (playerNetworkInfo.totalUploaded) {
301 totalTransferred += `/ ${playerNetworkInfo.totalUploaded} ⇑`
302 }
303
298 const downloadBreakdown = playerNetworkInfo.downloadedFromServer 304 const downloadBreakdown = playerNetworkInfo.downloadedFromServer
299 ? player.localize('{1} from servers · {2} from peers', [ downloadedFromServer, downloadedFromPeers ]) 305 ? player.localize('{1} from servers · {2} from peers', [ downloadedFromServer, downloadedFromPeers ])
300 : undefined 306 : undefined