aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-14 17:43:58 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 17:45:00 +0200
commitaea53cc64919b3a3ecfdf78b6b15c6a4d6edeea1 (patch)
tree502c81ed45d722dc5bad01fc21532b67ade824de /client/src/assets
parent496d784d0534cb09b97909d37b0e400d81a9078a (diff)
downloadPeerTube-aea53cc64919b3a3ecfdf78b6b15c6a4d6edeea1.tar.gz
PeerTube-aea53cc64919b3a3ecfdf78b6b15c6a4d6edeea1.tar.zst
PeerTube-aea53cc64919b3a3ecfdf78b6b15c6a4d6edeea1.zip
Fix incorrect resolution with webtorrent videos
Diffstat (limited to 'client/src/assets')
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index f9c050b84..5c8aca1f8 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -369,11 +369,10 @@ class WebTorrentPlugin extends Plugin {
369 if (files.length === 0) return undefined 369 if (files.length === 0) return undefined
370 if (files.length === 1) return files[0] 370 if (files.length === 1) return files[0]
371 371
372 // Don't change the torrent is the play was ended 372 // Don't change the torrent if the player ended
373 if (this.torrent && this.torrent.progress === 1 && this.player.ended()) return this.currentVideoFile 373 if (this.torrent && this.torrent.progress === 1 && this.player.ended()) return this.currentVideoFile
374 374
375 if (!averageDownloadSpeed) averageDownloadSpeed = this.getAndSaveActualDownloadSpeed() 375 if (!averageDownloadSpeed) averageDownloadSpeed = this.getAndSaveActualDownloadSpeed()
376 averageDownloadSpeed = 0
377 376
378 // Limit resolution according to player height 377 // Limit resolution according to player height
379 const playerHeight = this.playerElement.offsetHeight 378 const playerHeight = this.playerElement.offsetHeight