diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-26 09:55:23 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-26 10:49:27 +0100 |
commit | bf5685f0b7b1f23a1a3a972fc4d66061f31f9510 (patch) | |
tree | c477d973c725d7302e85f3b69cf6a5cf3bc10f14 /client/src/app | |
parent | 245dc51de07596341cf1b631bdd16d48aa534b38 (diff) | |
download | PeerTube-bf5685f0b7b1f23a1a3a972fc4d66061f31f9510.tar.gz PeerTube-bf5685f0b7b1f23a1a3a972fc4d66061f31f9510.tar.zst PeerTube-bf5685f0b7b1f23a1a3a972fc4d66061f31f9510.zip |
Add fallback to HTTP
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index d04d50310..c9bfa7ffb 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -272,6 +272,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
272 | 272 | ||
273 | private handleError (err: any) { | 273 | private handleError (err: any) { |
274 | const errorMessage: string = typeof err === 'string' ? err : err.message | 274 | const errorMessage: string = typeof err === 'string' ? err : err.message |
275 | if (!errorMessage) return | ||
276 | |||
275 | let message = '' | 277 | let message = '' |
276 | 278 | ||
277 | if (errorMessage.indexOf('http error') !== -1) { | 279 | if (errorMessage.indexOf('http error') !== -1) { |
@@ -353,9 +355,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
353 | this.zone.runOutsideAngular(() => { | 355 | this.zone.runOutsideAngular(() => { |
354 | videojs(this.playerElement, videojsOptions, function () { | 356 | videojs(this.playerElement, videojsOptions, function () { |
355 | self.player = this | 357 | self.player = this |
356 | this.on('customError', (event, data) => { | 358 | this.on('customError', (event, data) => self.handleError(data.err)) |
357 | self.handleError(data.err) | ||
358 | }) | ||
359 | }) | 359 | }) |
360 | }) | 360 | }) |
361 | } else { | 361 | } else { |