aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-07 16:53:11 +0100
committerChocobozzz <me@florianbigard.com>2020-12-07 16:53:11 +0100
commit6a882bc400d5b5960eb5a29cd72c9a5e0a69a64f (patch)
treef3634c1bc8ca898a795b3497e19e894450994243 /client/src/assets/player
parent77002f52917ec3078e0cc2071c07e759d8bb769d (diff)
downloadPeerTube-6a882bc400d5b5960eb5a29cd72c9a5e0a69a64f.tar.gz
PeerTube-6a882bc400d5b5960eb5a29cd72c9a5e0a69a64f.tar.zst
PeerTube-6a882bc400d5b5960eb5a29cd72c9a5e0a69a64f.zip
Relax webtorrent file check
Diffstat (limited to 'client/src/assets/player')
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index 9beb04d10..c36362408 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -132,14 +132,14 @@ class WebTorrentPlugin extends Plugin {
132 done: () => void = () => { /* empty */ } 132 done: () => void = () => { /* empty */ }
133 ) { 133 ) {
134 // Automatically choose the adapted video file 134 // Automatically choose the adapted video file
135 if (videoFile === undefined) { 135 if (!videoFile) {
136 const savedAverageBandwidth = getAverageBandwidthInStore() 136 const savedAverageBandwidth = getAverageBandwidthInStore()
137 videoFile = savedAverageBandwidth 137 videoFile = savedAverageBandwidth
138 ? this.getAppropriateFile(savedAverageBandwidth) 138 ? this.getAppropriateFile(savedAverageBandwidth)
139 : this.pickAverageVideoFile() 139 : this.pickAverageVideoFile()
140 } 140 }
141 141
142 if (!!videoFile) { 142 if (!videoFile) {
143 throw Error(`Can't update video file since videoFile is undefined.`) 143 throw Error(`Can't update video file since videoFile is undefined.`)
144 } 144 }
145 145
@@ -149,7 +149,7 @@ class WebTorrentPlugin extends Plugin {
149 } 149 }
150 150
151 // Do not display error to user because we will have multiple fallback 151 // Do not display error to user because we will have multiple fallback
152 this.disableErrorDisplay(); 152 this.disableErrorDisplay()
153 153
154 // Hack to "simulate" src link in video.js >= 6 154 // Hack to "simulate" src link in video.js >= 6
155 // Without this, we can't play the video after pausing it 155 // Without this, we can't play the video after pausing it