videoHTMLDescription = ''
likesBarTooltipText = ''
hasAlreadyAcceptedPrivacyConcern = false
+ remoteServerDown = false
private videojsLocaleLoaded = false
private otherVideos: Video[] = []
const errorMessage: string = typeof err === 'string' ? err : err.message
if (!errorMessage) return
- let message = ''
-
+ // Display a message in the video player instead of a notification
if (errorMessage.indexOf('http error') !== -1) {
- message = this.i18n('Cannot fetch video from server, maybe down.')
- } else {
- message = errorMessage
+ this.flushPlayer()
+ this.remoteServerDown = true
+ return
}
- this.notificationsService.error(this.i18n('Error'), message)
+ this.notificationsService.error(this.i18n('Error'), errorMessage)
}
private checkUserRating () {
// Re init attributes
this.descriptionLoading = false
this.completeDescriptionShown = false
+ this.remoteServerDown = false
this.updateOtherVideosDisplayed()