aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/webtorrent-info-button.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/webtorrent-info-button.ts')
-rw-r--r--client/src/assets/player/webtorrent-info-button.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/client/src/assets/player/webtorrent-info-button.ts b/client/src/assets/player/webtorrent-info-button.ts
index 1296aca3b..5f3e80c79 100644
--- a/client/src/assets/player/webtorrent-info-button.ts
+++ b/client/src/assets/player/webtorrent-info-button.ts
@@ -3,6 +3,7 @@ import { bytes } from './utils'
3 3
4const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button') 4const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
5class WebtorrentInfoButton extends Button { 5class WebtorrentInfoButton extends Button {
6
6 createEl () { 7 createEl () {
7 const div = videojsUntyped.dom.createEl('div', { 8 const div = videojsUntyped.dom.createEl('div', {
8 className: 'vjs-peertube' 9 className: 'vjs-peertube'
@@ -75,8 +76,13 @@ class WebtorrentInfoButton extends Button {
75 76
76 const downloadSpeed = bytes(data.downloadSpeed) 77 const downloadSpeed = bytes(data.downloadSpeed)
77 const uploadSpeed = bytes(data.uploadSpeed) 78 const uploadSpeed = bytes(data.uploadSpeed)
79 const totalDownloaded = bytes(data.downloaded)
80 const totalUploaded = bytes(data.uploaded)
78 const numPeers = data.numPeers 81 const numPeers = data.numPeers
79 82
83 subDivWebtorrent.title = this.player_.localize('Total Downloaded: ') + totalDownloaded.join(' ') + '\n' +
84 this.player_.localize('Total uploaded: ' + totalUploaded.join(' '))
85
80 downloadSpeedNumber.textContent = downloadSpeed[ 0 ] 86 downloadSpeedNumber.textContent = downloadSpeed[ 0 ]
81 downloadSpeedUnit.textContent = ' ' + downloadSpeed[ 1 ] 87 downloadSpeedUnit.textContent = ' ' + downloadSpeed[ 1 ]
82 88