From 67c687236f84dd288f2df3201c8ab77b93682b67 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 May 2019 14:17:38 +0200 Subject: Fix playlist block with theater player --- client/src/app/videos/+video-watch/video-watch.component.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'client/src/app/videos') 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 8ca5c4118..bada9bae8 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -18,6 +18,7 @@ $player-factor: 1.7; // 16/9 width: 100% !important; height: auto !important; max-height: 300px !important; + max-width: initial; border-bottom: 1px solid $separator-border-color !important; } -- cgit v1.2.3 From 1c8ddbfaa03e241c782201343d424748efc191c1 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 17 May 2019 14:34:21 +0200 Subject: Reset playlist add component when video changes --- .../videos/+video-watch/video-watch.component.ts | 38 ++++++++++++---------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'client/src/app/videos') 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 b147b75b0..631504eab 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts @@ -119,23 +119,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { if (videoId) this.loadVideo(videoId) }) - this.hotkeys = [ - new Hotkey('shift+l', (event: KeyboardEvent): boolean => { - this.setLike() - return false - }, undefined, this.i18n('Like the video')), - new Hotkey('shift+d', (event: KeyboardEvent): boolean => { - this.setDislike() - return false - }, undefined, this.i18n('Dislike the video')), - new Hotkey('shift+s', (event: KeyboardEvent): boolean => { - this.subscribeButton.subscribed ? - this.subscribeButton.unsubscribe() : - this.subscribeButton.subscribe() - return false - }, undefined, this.i18n('Subscribe to the account')) - ] - if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) + this.initHotkeys() } ngOnDestroy () { @@ -565,4 +549,24 @@ export class VideoWatchComponent implements OnInit, OnDestroy { this.player = undefined } } + + private initHotkeys () { + this.hotkeys = [ + new Hotkey('shift+l', (event: KeyboardEvent): boolean => { + this.setLike() + return false + }, undefined, this.i18n('Like the video')), + new Hotkey('shift+d', (event: KeyboardEvent): boolean => { + this.setDislike() + return false + }, undefined, this.i18n('Dislike the video')), + new Hotkey('shift+s', (event: KeyboardEvent): boolean => { + this.subscribeButton.subscribed ? + this.subscribeButton.unsubscribe() : + this.subscribeButton.subscribe() + return false + }, undefined, this.i18n('Subscribe to the account')) + ] + if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) + } } -- cgit v1.2.3