aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/webtorrent/webtorrent-plugin.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-02-02 11:16:23 +0100
committerChocobozzz <me@florianbigard.com>2022-02-02 11:26:18 +0100
commitc4207f978e23c77f09c4646b940dfd532281300f (patch)
treeb11f459839dced708a80f6cff5d57e49ecf45917 /client/src/assets/player/webtorrent/webtorrent-plugin.ts
parentb25fdc73fdf22896093e12c51bb64160c0410879 (diff)
downloadPeerTube-c4207f978e23c77f09c4646b940dfd532281300f.tar.gz
PeerTube-c4207f978e23c77f09c4646b940dfd532281300f.tar.zst
PeerTube-c4207f978e23c77f09c4646b940dfd532281300f.zip
Fast forward on HLS decode error
Diffstat (limited to 'client/src/assets/player/webtorrent/webtorrent-plugin.ts')
-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