diff options
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.scss | 1 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 38 |
2 files changed, 22 insertions, 17 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 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 | |||
18 | width: 100% !important; | 18 | width: 100% !important; |
19 | height: auto !important; | 19 | height: auto !important; |
20 | max-height: 300px !important; | 20 | max-height: 300px !important; |
21 | max-width: initial; | ||
21 | border-bottom: 1px solid $separator-border-color !important; | 22 | border-bottom: 1px solid $separator-border-color !important; |
22 | } | 23 | } |
23 | 24 | ||
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 { | |||
119 | if (videoId) this.loadVideo(videoId) | 119 | if (videoId) this.loadVideo(videoId) |
120 | }) | 120 | }) |
121 | 121 | ||
122 | this.hotkeys = [ | 122 | this.initHotkeys() |
123 | new Hotkey('shift+l', (event: KeyboardEvent): boolean => { | ||
124 | this.setLike() | ||
125 | return false | ||
126 | }, undefined, this.i18n('Like the video')), | ||
127 | new Hotkey('shift+d', (event: KeyboardEvent): boolean => { | ||
128 | this.setDislike() | ||
129 | return false | ||
130 | }, undefined, this.i18n('Dislike the video')), | ||
131 | new Hotkey('shift+s', (event: KeyboardEvent): boolean => { | ||
132 | this.subscribeButton.subscribed ? | ||
133 | this.subscribeButton.unsubscribe() : | ||
134 | this.subscribeButton.subscribe() | ||
135 | return false | ||
136 | }, undefined, this.i18n('Subscribe to the account')) | ||
137 | ] | ||
138 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) | ||
139 | } | 123 | } |
140 | 124 | ||
141 | ngOnDestroy () { | 125 | ngOnDestroy () { |
@@ -565,4 +549,24 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
565 | this.player = undefined | 549 | this.player = undefined |
566 | } | 550 | } |
567 | } | 551 | } |
552 | |||
553 | private initHotkeys () { | ||
554 | this.hotkeys = [ | ||
555 | new Hotkey('shift+l', (event: KeyboardEvent): boolean => { | ||
556 | this.setLike() | ||
557 | return false | ||
558 | }, undefined, this.i18n('Like the video')), | ||
559 | new Hotkey('shift+d', (event: KeyboardEvent): boolean => { | ||
560 | this.setDislike() | ||
561 | return false | ||
562 | }, undefined, this.i18n('Dislike the video')), | ||
563 | new Hotkey('shift+s', (event: KeyboardEvent): boolean => { | ||
564 | this.subscribeButton.subscribed ? | ||
565 | this.subscribeButton.unsubscribe() : | ||
566 | this.subscribeButton.subscribe() | ||
567 | return false | ||
568 | }, undefined, this.i18n('Subscribe to the account')) | ||
569 | ] | ||
570 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) | ||
571 | } | ||
568 | } | 572 | } |