diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-29 08:37:25 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-02-11 09:13:02 +0100 |
commit | 092092969633bbcf6d4891a083ea497a7d5c3154 (patch) | |
tree | 69e82fe4f60c444cca216830e96afe143a9dac71 /client/src/assets/player/videojs-components | |
parent | 4348a27d252a3349bafa7ef4859c0e2cf060c255 (diff) | |
download | PeerTube-092092969633bbcf6d4891a083ea497a7d5c3154.tar.gz PeerTube-092092969633bbcf6d4891a083ea497a7d5c3154.tar.zst PeerTube-092092969633bbcf6d4891a083ea497a7d5c3154.zip |
Add hls support on server
Diffstat (limited to 'client/src/assets/player/videojs-components')
-rw-r--r-- | client/src/assets/player/videojs-components/p2p-info-button.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/client/src/assets/player/videojs-components/p2p-info-button.ts b/client/src/assets/player/videojs-components/p2p-info-button.ts index 2fc4c4562..6424787b2 100644 --- a/client/src/assets/player/videojs-components/p2p-info-button.ts +++ b/client/src/assets/player/videojs-components/p2p-info-button.ts | |||
@@ -75,11 +75,12 @@ class P2pInfoButton extends Button { | |||
75 | } | 75 | } |
76 | 76 | ||
77 | const p2pStats = data.p2p | 77 | const p2pStats = data.p2p |
78 | const httpStats = data.http | ||
78 | 79 | ||
79 | const downloadSpeed = bytes(p2pStats.downloadSpeed) | 80 | const downloadSpeed = bytes(p2pStats.downloadSpeed + httpStats.downloadSpeed) |
80 | const uploadSpeed = bytes(p2pStats.uploadSpeed) | 81 | const uploadSpeed = bytes(p2pStats.uploadSpeed + httpStats.uploadSpeed) |
81 | const totalDownloaded = bytes(p2pStats.downloaded) | 82 | const totalDownloaded = bytes(p2pStats.downloaded + httpStats.downloaded) |
82 | const totalUploaded = bytes(p2pStats.uploaded) | 83 | const totalUploaded = bytes(p2pStats.uploaded + httpStats.uploaded) |
83 | const numPeers = p2pStats.numPeers | 84 | const numPeers = p2pStats.numPeers |
84 | 85 | ||
85 | subDivWebtorrent.title = this.player_.localize('Total downloaded: ') + totalDownloaded.join(' ') + '\n' + | 86 | subDivWebtorrent.title = this.player_.localize('Total downloaded: ') + totalDownloaded.join(' ') + '\n' + |
@@ -92,7 +93,7 @@ class P2pInfoButton extends Button { | |||
92 | uploadSpeedUnit.textContent = ' ' + uploadSpeed[ 1 ] | 93 | uploadSpeedUnit.textContent = ' ' + uploadSpeed[ 1 ] |
93 | 94 | ||
94 | peersNumber.textContent = numPeers | 95 | peersNumber.textContent = numPeers |
95 | peersText.textContent = ' ' + this.player_.localize('peers') | 96 | peersText.textContent = ' ' + (numPeers > 1 ? this.player_.localize('peers') : this.player_.localize('peer')) |
96 | 97 | ||
97 | subDivHttp.className = 'vjs-peertube-hidden' | 98 | subDivHttp.className = 'vjs-peertube-hidden' |
98 | subDivWebtorrent.className = 'vjs-peertube-displayed' | 99 | subDivWebtorrent.className = 'vjs-peertube-displayed' |