ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix incorrect resolution with webtorrent videos
Chocobozzzaea53cc64919
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.tsindex f9c050b841..5c8aca1f83 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 {if (files.length === 0) return undefinedif (files.length === 1) return files[0]- // Don't change the torrent is the play was ended+ // Don't change the torrent if the player endedif (this.torrent && this.torrent.progress === 1 && this.player.ended()) return this.currentVideoFileif (!averageDownloadSpeed) averageDownloadSpeed = this.getAndSaveActualDownloadSpeed()- averageDownloadSpeed = 0// Limit resolution according to player heightconst playerHeight = this.playerElement.offsetHeight