X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fvideo-watch.component.ts;h=ff8baaeb3ff1a6e1ef848745976673d460578865;hb=3b492bff49bbab71e826cc4fe93db8c6a74a3391;hp=43afbae1a19261df7b159a24d7710eb12e06f3b3;hpb=6d88de725321e77486788f64a2e2537f5e6ef0cd;p=github%2FChocobozzz%2FPeerTube.git 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 43afbae1a..ff8baaeb3 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -1,5 +1,5 @@ import { catchError } from 'rxjs/operators' -import { Component, ElementRef, Inject, LOCALE_ID, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' +import { ChangeDetectorRef, Component, ElementRef, Inject, LOCALE_ID, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { RedirectService } from '@app/core/routing/redirect.service' import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage' @@ -65,6 +65,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { constructor ( private elementRef: ElementRef, + private changeDetector: ChangeDetectorRef, private route: ActivatedRoute, private router: Router, private videoService: VideoService, @@ -314,9 +315,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy { if (!errorMessage) return // Display a message in the video player instead of a notification - if (errorMessage.indexOf('http error') !== -1) { + if (errorMessage.indexOf('from xs param') !== -1) { this.flushPlayer() this.remoteServerDown = true + this.changeDetector.detectChanges() + return }