From c4207f978e23c77f09c4646b940dfd532281300f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 2 Feb 2022 11:16:23 +0100 Subject: Fast forward on HLS decode error --- client/src/assets/player/webtorrent/webtorrent-plugin.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'client/src/assets/player/webtorrent') 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 { } // Do not display error to user because we will have multiple fallback - this.disableErrorDisplay(); + this.player.peertube().hideFatalError(); // Hack to "simulate" src link in video.js >= 6 // Without this, we can't play the video after pausing it @@ -524,7 +524,7 @@ class WebTorrentPlugin extends Plugin { this.torrent = null // Enable error display now this is our last fallback - this.player.one('error', () => this.enableErrorDisplay()) + this.player.one('error', () => this.player.peertube().displayFatalError()) const httpUrl = this.currentVideoFile.fileUrl this.player.src = this.savePlayerSrcFunction @@ -549,14 +549,6 @@ class WebTorrentPlugin extends Plugin { return this.player.trigger('customError', { err }) } - private enableErrorDisplay () { - this.player.addClass('vjs-error-display-enabled') - } - - private disableErrorDisplay () { - this.player.removeClass('vjs-error-display-enabled') - } - private pickAverageVideoFile () { if (this.videoFiles.length === 1) return this.videoFiles[0] -- cgit v1.2.3