background-color: #000;
display: flex;
justify-content: center;
- height: 500px;
-
- @media screen and (max-width: 600px) {
- width: 100vw;
- height: calc(100vw / 1.7); // 16/9
- }
.remote-server-down {
color: #fff;
justify-content: center;
background-color: #141313;
width: 100%;
- height: 100%;
font-size: 24px;
+ height: 500px;
@media screen and (max-width: 1000px) {
font-size: 20px;
/deep/ .video-js {
width: 888px;
- height: 100%;
+ height: 500px;
+
+ &.vjs-theater-enabled {
+ height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
+ width: 100%;
+ }
// VideoJS create an inner video player
video {
}
}
- /deep/ .video-js.vjs-theater-enabled {
- width: 100%;
- height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
+ @media screen and (max-width: 600px) {
+ .remote-server-down,
+ /deep/ .video-js {
+ width: 100vw;
+ height: calc(100vw / 1.7); // 16/9
+ }
}
}
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.indexOf('from xs param') !== -1) {
this.flushPlayer()
this.remoteServerDown = true
+ this.changeDetector.detectChanges()
+
return
}