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'
constructor (
private elementRef: ElementRef,
+ private changeDetector: ChangeDetectorRef,
private route: ActivatedRoute,
private router: Router,
private videoService: VideoService,
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
}