mirror of https://github.com/Chocobozzz/PeerTube
Fix regression in theater mode
parent
330eaf1296
commit
3b492bff49
|
@ -5,12 +5,6 @@
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 500px;
|
|
||||||
|
|
||||||
@media screen and (max-width: 600px) {
|
|
||||||
width: 100vw;
|
|
||||||
height: calc(100vw / 1.7); // 16/9
|
|
||||||
}
|
|
||||||
|
|
||||||
.remote-server-down {
|
.remote-server-down {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
@ -21,8 +15,8 @@
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: #141313;
|
background-color: #141313;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
|
height: 500px;
|
||||||
|
|
||||||
@media screen and (max-width: 1000px) {
|
@media screen and (max-width: 1000px) {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
@ -35,7 +29,12 @@
|
||||||
|
|
||||||
/deep/ .video-js {
|
/deep/ .video-js {
|
||||||
width: 888px;
|
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
|
// VideoJS create an inner video player
|
||||||
video {
|
video {
|
||||||
|
@ -44,9 +43,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .video-js.vjs-theater-enabled {
|
@media screen and (max-width: 600px) {
|
||||||
width: 100%;
|
.remote-server-down,
|
||||||
height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
|
/deep/ .video-js {
|
||||||
|
width: 100vw;
|
||||||
|
height: calc(100vw / 1.7); // 16/9
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { catchError } from 'rxjs/operators'
|
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 { ActivatedRoute, Router } from '@angular/router'
|
||||||
import { RedirectService } from '@app/core/routing/redirect.service'
|
import { RedirectService } from '@app/core/routing/redirect.service'
|
||||||
import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
|
import { peertubeLocalStorage } from '@app/shared/misc/peertube-local-storage'
|
||||||
|
@ -65,6 +65,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
private elementRef: ElementRef,
|
private elementRef: ElementRef,
|
||||||
|
private changeDetector: ChangeDetectorRef,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private videoService: VideoService,
|
private videoService: VideoService,
|
||||||
|
@ -317,6 +318,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
if (errorMessage.indexOf('from xs param') !== -1) {
|
if (errorMessage.indexOf('from xs param') !== -1) {
|
||||||
this.flushPlayer()
|
this.flushPlayer()
|
||||||
this.remoteServerDown = true
|
this.remoteServerDown = true
|
||||||
|
this.changeDetector.detectChanges()
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue