diff options
author | Chocobozzz <me@florianbigard.com> | 2019-06-11 16:26:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-06-11 16:26:48 +0200 |
commit | 011e1e6b37e15a44624b2d0e50263e16382060d2 (patch) | |
tree | 15d75ab2380f093e560458efe26291fc6b05b038 /client/src | |
parent | 675a8fc74faefa0161b0754bd61c710de7a449c5 (diff) | |
download | PeerTube-011e1e6b37e15a44624b2d0e50263e16382060d2.tar.gz PeerTube-011e1e6b37e15a44624b2d0e50263e16382060d2.tar.zst PeerTube-011e1e6b37e15a44624b2d0e50263e16382060d2.zip |
Speedup video watch layout build
Diffstat (limited to 'client/src')
3 files changed, 5 insertions, 2 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index bada9bae8..35ea0fffd 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss | |||
@@ -347,6 +347,7 @@ $player-factor: 1.7; // 16/9 | |||
347 | /deep/ .other-videos { | 347 | /deep/ .other-videos { |
348 | padding-left: 15px; | 348 | padding-left: 15px; |
349 | flex-basis: $other-videos-width; | 349 | flex-basis: $other-videos-width; |
350 | min-width: $other-videos-width; | ||
350 | 351 | ||
351 | .title-page { | 352 | .title-page { |
352 | margin-top: 0 !important; | 353 | margin-top: 0 !important; |
diff --git a/client/src/app/videos/+video-watch/video-watch.component.ts b/client/src/app/videos/+video-watch/video-watch.component.ts index cf9dc8f9c..29c472a42 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -31,6 +31,7 @@ import { VideoPlaylistService } from '@app/shared/video-playlist/video-playlist. | |||
31 | import { Video } from '@app/shared/video/video.model' | 31 | import { Video } from '@app/shared/video/video.model' |
32 | import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils' | 32 | import { isWebRTCDisabled, timeToInt } from '../../../assets/player/utils' |
33 | import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' | 33 | import { VideoWatchPlaylistComponent } from '@app/videos/+video-watch/video-watch-playlist.component' |
34 | import { getStoredTheater } from '../../../assets/player/peertube-player-local-storage' | ||
34 | 35 | ||
35 | @Component({ | 36 | @Component({ |
36 | selector: 'my-video-watch', | 37 | selector: 'my-video-watch', |
@@ -121,6 +122,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
121 | }) | 122 | }) |
122 | 123 | ||
123 | this.initHotkeys() | 124 | this.initHotkeys() |
125 | |||
126 | this.theaterEnabled = getStoredTheater() | ||
124 | } | 127 | } |
125 | 128 | ||
126 | ngOnDestroy () { | 129 | ngOnDestroy () { |
@@ -445,7 +448,6 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
445 | 448 | ||
446 | this.zone.runOutsideAngular(async () => { | 449 | this.zone.runOutsideAngular(async () => { |
447 | this.player = await PeertubePlayerManager.initialize(mode, options) | 450 | this.player = await PeertubePlayerManager.initialize(mode, options) |
448 | this.theaterEnabled = this.player.theaterEnabled | ||
449 | 451 | ||
450 | this.player.on('customError', ({ err }: { err: any }) => this.handleError(err)) | 452 | this.player.on('customError', ({ err }: { err: any }) => this.handleError(err)) |
451 | 453 | ||
diff --git a/client/src/assets/player/peertube-player-local-storage.ts b/client/src/assets/player/peertube-player-local-storage.ts index 059fca308..f6c5c5419 100644 --- a/client/src/assets/player/peertube-player-local-storage.ts +++ b/client/src/assets/player/peertube-player-local-storage.ts | |||
@@ -29,7 +29,7 @@ function getStoredTheater () { | |||
29 | const value = getLocalStorage('theater-enabled') | 29 | const value = getLocalStorage('theater-enabled') |
30 | if (value !== null && value !== undefined) return value === 'true' | 30 | if (value !== null && value !== undefined) return value === 'true' |
31 | 31 | ||
32 | return undefined | 32 | return false |
33 | } | 33 | } |
34 | 34 | ||
35 | function saveVolumeInStore (value: number) { | 35 | function saveVolumeInStore (value: number) { |