diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-19 10:20:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-19 10:20:01 +0200 |
commit | bfd01f289dd9b7896fc94a1ee8ce2e0fbac1cf99 (patch) | |
tree | 3b0f702699e0a3e7f0ed10d1b6ac1b1e9f3a4fc5 /client/src/assets | |
parent | 6b745df0878c281a747ed0f16c7dbe3010bcaa8a (diff) | |
download | PeerTube-bfd01f289dd9b7896fc94a1ee8ce2e0fbac1cf99.tar.gz PeerTube-bfd01f289dd9b7896fc94a1ee8ce2e0fbac1cf99.tar.zst PeerTube-bfd01f289dd9b7896fc94a1ee8ce2e0fbac1cf99.zip |
Fix player metrics
Diffstat (limited to 'client/src/assets')
-rw-r--r-- | client/src/assets/player/shared/metrics/metrics-plugin.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/client/src/assets/player/shared/metrics/metrics-plugin.ts b/client/src/assets/player/shared/metrics/metrics-plugin.ts index c8b61592c..6ca368f87 100644 --- a/client/src/assets/player/shared/metrics/metrics-plugin.ts +++ b/client/src/assets/player/shared/metrics/metrics-plugin.ts | |||
@@ -144,6 +144,8 @@ class MetricsPlugin extends Plugin { | |||
144 | 144 | ||
145 | this.player.on('http-info', (_event, data: PlayerNetworkInfo) => { | 145 | this.player.on('http-info', (_event, data: PlayerNetworkInfo) => { |
146 | this.downloadedBytesHTTP += Math.round(data.http.downloaded - (this.lastPlayerNetworkInfo?.http.downloaded || 0)) | 146 | this.downloadedBytesHTTP += Math.round(data.http.downloaded - (this.lastPlayerNetworkInfo?.http.downloaded || 0)) |
147 | |||
148 | this.lastPlayerNetworkInfo = data | ||
147 | }) | 149 | }) |
148 | } | 150 | } |
149 | 151 | ||