aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/assets/player/peertube-videojs-plugin.ts4
-rw-r--r--client/src/assets/player/webtorrent-info-button.ts6
2 files changed, 9 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts
index 35a347e99..fc07c35d6 100644
--- a/client/src/assets/player/peertube-videojs-plugin.ts
+++ b/client/src/assets/player/peertube-videojs-plugin.ts
@@ -466,7 +466,9 @@ class PeerTubePlugin extends Plugin {
466 return this.trigger('torrentInfo', { 466 return this.trigger('torrentInfo', {
467 downloadSpeed: this.torrent.downloadSpeed, 467 downloadSpeed: this.torrent.downloadSpeed,
468 numPeers: this.torrent.numPeers, 468 numPeers: this.torrent.numPeers,
469 uploadSpeed: this.torrent.uploadSpeed 469 uploadSpeed: this.torrent.uploadSpeed,
470 downloaded: this.torrent.downloaded,
471 uploaded: this.torrent.uploaded
470 }) 472 })
471 }, this.CONSTANTS.INFO_SCHEDULER) 473 }, this.CONSTANTS.INFO_SCHEDULER)
472 } 474 }
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