From 6d88de725321e77486788f64a2e2537f5e6ef0cd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 16 Jul 2018 19:15:20 +0200 Subject: Correctly handle error when remote instance is down --- client/src/assets/player/peertube-videojs-plugin.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client/src/assets/player') diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index 0dcbe49b1..6d96e1c0b 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts @@ -268,7 +268,12 @@ class PeerTubePlugin extends Plugin { return this.addTorrent(this.torrent['xs'], previousVideoFile, newOptions, done) } - return console.warn(err) + // Remote instance is down + if (err.message.indexOf('http error from xs param') !== -1) { + this.handleError(err) + } + + console.warn(err) }) } -- cgit v1.2.3