Speedup video watch layout build
This commit is contained in:
parent
675a8fc74f
commit
011e1e6b37
|
@ -347,6 +347,7 @@ $player-factor: 1.7; // 16/9
|
||||||
/deep/ .other-videos {
|
/deep/ .other-videos {
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
flex-basis: $other-videos-width;
|
flex-basis: $other-videos-width;
|
||||||
|
min-width: $other-videos-width;
|
||||||
|
|
||||||
.title-page {
|
.title-page {
|
||||||
margin-top: 0 !important;
|
margin-top: 0 !important;
|
||||||
|
|
|
@ -31,6 +31,7 @@ import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.
|
||||||
import { Video } from '@app/shared/video/video.model'
|
import { Video } from '@app/shared/video/video.model'
|
||||||
import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils'
|
import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils'
|
||||||
import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component'
|
import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component'
|
||||||
|
import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'my-video-watch',
|
selector: 'my-video-watch',
|
||||||
|
@ -121,6 +122,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
})
|
})
|
||||||
|
|
||||||
this.initHotkeys()
|
this.initHotkeys()
|
||||||
|
|
||||||
|
this.theaterEnabled = getStoredTheater()
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnDestroy () {
|
ngOnDestroy () {
|
||||||
|
@ -445,7 +448,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
this.zone.runOutsideAngular(async () => {
|
this.zone.runOutsideAngular(async () => {
|
||||||
this.player = await PeertubePlayerManager.initialize(mode, options)
|
this.player = await PeertubePlayerManager.initialize(mode, options)
|
||||||
this.theaterEnabled = this.player.theaterEnabled
|
|
||||||
|
|
||||||
this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
|
this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ function getStoredTheater () {
|
||||||
const value = getLocalStorage('theater-enabled')
|
const value = getLocalStorage('theater-enabled')
|
||||||
if (value !== null && value !== undefined) return value === 'true'
|
if (value !== null && value !== undefined) return value === 'true'
|
||||||
|
|
||||||
return undefined
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveVolumeInStore (value: number) {
|
function saveVolumeInStore (value: number) {
|
||||||
|
|
Loading…
Reference in New Issue