aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/webtorrent
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets/player/webtorrent')
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts12
1 files changed, 2 insertions, 10 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index 16dc7a244..4bcb2766a 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -145,7 +145,7 @@ class WebTorrentPlugin extends Plugin {
145 } 145 }
146 146
147 // Do not display error to user because we will have multiple fallback 147 // Do not display error to user because we will have multiple fallback
148 this.disableErrorDisplay(); 148 this.player.peertube().hideFatalError();
149 149
150 // Hack to "simulate" src link in video.js >= 6 150 // Hack to "simulate" src link in video.js >= 6
151 // Without this, we can't play the video after pausing it 151 // Without this, we can't play the video after pausing it
@@ -524,7 +524,7 @@ class WebTorrentPlugin extends Plugin {
524 this.torrent = null 524 this.torrent = null
525 525
526 // Enable error display now this is our last fallback 526 // Enable error display now this is our last fallback
527 this.player.one('error', () => this.enableErrorDisplay()) 527 this.player.one('error', () => this.player.peertube().displayFatalError())
528 528
529 const httpUrl = this.currentVideoFile.fileUrl 529 const httpUrl = this.currentVideoFile.fileUrl
530 this.player.src = this.savePlayerSrcFunction 530 this.player.src = this.savePlayerSrcFunction
@@ -549,14 +549,6 @@ class WebTorrentPlugin extends Plugin {
549 return this.player.trigger('customError', { err }) 549 return this.player.trigger('customError', { err })
550 } 550 }
551 551
552 private enableErrorDisplay () {
553 this.player.addClass('vjs-error-display-enabled')
554 }
555
556 private disableErrorDisplay () {
557 this.player.removeClass('vjs-error-display-enabled')
558 }
559
560 private pickAverageVideoFile () { 552 private pickAverageVideoFile () {
561 if (this.videoFiles.length === 1) return this.videoFiles[0] 553 if (this.videoFiles.length === 1) return this.videoFiles[0]
562 554