diff options
Diffstat (limited to 'client/src/app/videos')
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.html | 3 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/video-watch.component.ts | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/client/src/app/videos/+video-watch/video-watch.component.html b/client/src/app/videos/+video-watch/video-watch.component.html index 647cc3c57..38ad4e948 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.html +++ b/client/src/app/videos/+video-watch/video-watch.component.html | |||
@@ -98,7 +98,8 @@ | |||
98 | </div> | 98 | </div> |
99 | 99 | ||
100 | <my-video-actions-dropdown | 100 | <my-video-actions-dropdown |
101 | placement="top" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" (videoRemoved)="onVideoRemoved()" | 101 | placement="top" buttonDirection="horizontal" [buttonStyled]="true" [video]="video" |
102 | (videoRemoved)="onVideoRemoved()" (modalOpened)="onModalOpened()" | ||
102 | ></my-video-actions-dropdown> | 103 | ></my-video-actions-dropdown> |
103 | </div> | 104 | </div> |
104 | 105 | ||
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 80aa8ebe4..0007331f8 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.ts +++ b/client/src/app/videos/+video-watch/video-watch.component.ts | |||
@@ -203,10 +203,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
203 | } | 203 | } |
204 | 204 | ||
205 | showSupportModal () { | 205 | showSupportModal () { |
206 | this.pausePlayer() | ||
207 | |||
206 | this.videoSupportModal.show() | 208 | this.videoSupportModal.show() |
207 | } | 209 | } |
208 | 210 | ||
209 | showShareModal () { | 211 | showShareModal () { |
212 | this.pausePlayer() | ||
213 | |||
210 | this.videoShareModal.show(this.currentTime) | 214 | this.videoShareModal.show(this.currentTime) |
211 | } | 215 | } |
212 | 216 | ||
@@ -227,6 +231,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
227 | } | 231 | } |
228 | } | 232 | } |
229 | 233 | ||
234 | onModalOpened () { | ||
235 | this.pausePlayer() | ||
236 | } | ||
237 | |||
230 | onVideoRemoved () { | 238 | onVideoRemoved () { |
231 | this.redirectService.redirectToHomepage() | 239 | this.redirectService.redirectToHomepage() |
232 | } | 240 | } |
@@ -622,4 +630,10 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
622 | ] | 630 | ] |
623 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) | 631 | if (this.isUserLoggedIn()) this.hotkeysService.add(this.hotkeys) |
624 | } | 632 | } |
633 | |||
634 | private pausePlayer () { | ||
635 | if (!this.player) return | ||
636 | |||
637 | this.player.pause() | ||
638 | } | ||
625 | } | 639 | } |