]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Speedup video watch layout build
authorChocobozzz <me@florianbigard.com>
Tue, 11 Jun 2019 14:26:48 +0000 (16:26 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 11 Jun 2019 14:26:48 +0000 (16:26 +0200)
client/src/app/videos/+video-watch/video-watch.component.scss
client/src/app/videos/+video-watch/video-watch.component.ts
client/src/assets/player/peertube-player-local-storage.ts

index bada9bae8ee50b65a61f4d2d49dbd29abbf4746d..35ea0fffd6d146c9238d1db106488a916b74428f 100644 (file)
@@ -347,6 +347,7 @@ $player-factor: 1.7; // 16/9
   /deep/ .other-videos {
     padding-left: 15px;
     flex-basis: $other-videos-width;
+    min-width: $other-videos-width;
 
     .title-page {
       margin-top: 0 !important;
index cf9dc8f9ce6327e89d5dbe74f71174a93524979e..29c472a425f153b73b003970483cbbb1cca329cb 100644 (file)
@@ -31,6 +31,7 @@ import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist.
 import { Video } from '@app/shared/video/video.model'
 import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils'
 import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component'
+import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage'
 
 @Component({
   selector: 'my-video-watch',
@@ -121,6 +122,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
     })
 
     this.initHotkeys()
+
+    this.theaterEnabled = getStoredTheater()
   }
 
   ngOnDestroy () {
@@ -445,7 +448,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
 
     this.zone.runOutsideAngular(async () => {
       this.player = await PeertubePlayerManager.initialize(mode, options)
-      this.theaterEnabled = this.player.theaterEnabled
 
       this.player.on('customError', ({ err }: { err: any }) => this.handleError(err))
 
index 059fca3083866b19f1b7ed9095e6b2aaca3d9d26..f6c5c5419fd5120124d3a294602989e56495b04f 100644 (file)
@@ -29,7 +29,7 @@ function getStoredTheater () {
   const value = getLocalStorage('theater-enabled')
   if (value !== null && value !== undefined) return value === 'true'
 
-  return undefined
+  return false
 }
 
 function saveVolumeInStore (value: number) {