aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-05-14 13:58:40 +0200
committerChocobozzz <me@florianbigard.com>2021-05-14 13:58:40 +0200
commit1a5b67b66d8327017d7763f4b2d54abd29c345de (patch)
tree387c3a9507aeab259c29edae6f8d121740bfcc1b
parent462212107a04592518193d8e9a7a7c517d982791 (diff)
downloadPeerTube-1a5b67b66d8327017d7763f4b2d54abd29c345de.tar.gz
PeerTube-1a5b67b66d8327017d7763f4b2d54abd29c345de.tar.zst
PeerTube-1a5b67b66d8327017d7763f4b2d54abd29c345de.zip
Fix http player defaulting to audio resolution
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index 6f5fbe4c9..e27a16390 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -557,7 +557,8 @@ class WebTorrentPlugin extends Plugin {
557 private pickAverageVideoFile () { 557 private pickAverageVideoFile () {
558 if (this.videoFiles.length === 1) return this.videoFiles[0] 558 if (this.videoFiles.length === 1) return this.videoFiles[0]
559 559
560 return this.videoFiles[Math.floor(this.videoFiles.length / 2)] 560 const files = this.videoFiles.filter(f => f.resolution.id !== 0)
561 return files[Math.floor(files.length / 2)]
561 } 562 }
562 563
563 private stopTorrent (torrent: WebTorrent.Torrent) { 564 private stopTorrent (torrent: WebTorrent.Torrent) {