aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+videos/+video-watch/modal/video-support.component.ts4
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts23
2 files changed, 25 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-watch/modal/video-support.component.ts b/client/src/app/+videos/+video-watch/modal/video-support.component.ts
index 48d5f2948..bd5290a72 100644
--- a/client/src/app/+videos/+video-watch/modal/video-support.component.ts
+++ b/client/src/app/+videos/+video-watch/modal/video-support.component.ts
@@ -21,9 +21,11 @@ export class VideoSupportComponent {
21 ) { } 21 ) { }
22 22
23 show () { 23 show () {
24 this.modalService.open(this.modal, { centered: true }) 24 const modalRef = this.modalService.open(this.modal, { centered: true })
25 25
26 this.markdownService.enhancedMarkdownToHTML(this.video.support) 26 this.markdownService.enhancedMarkdownToHTML(this.video.support)
27 .then(r => this.videoHTMLSupport = r) 27 .then(r => this.videoHTMLSupport = r)
28
29 return modalRef
28 } 30 }
29} 31}
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 d8136ab4f..33f998282 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -236,9 +236,18 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
236 } 236 }
237 237
238 showSupportModal () { 238 showSupportModal () {
239 // Check video was playing before opening support modal
240 const isVideoPlaying = this.isPlaying()
241
239 this.pausePlayer() 242 this.pausePlayer()
240 243
241 this.videoSupportModal.show() 244 const modalRef = this.videoSupportModal.show()
245
246 modalRef.result.then(() => {
247 if (isVideoPlaying) {
248 this.resumePlayer()
249 }
250 })
242 } 251 }
243 252
244 showShareModal () { 253 showShareModal () {
@@ -757,6 +766,18 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
757 this.player.pause() 766 this.player.pause()
758 } 767 }
759 768
769 private resumePlayer () {
770 if (!this.player) return
771
772 this.player.play()
773 }
774
775 private isPlaying () {
776 if (!this.player) return
777
778 return !this.player.paused()
779 }
780
760 private initHotkeys () { 781 private initHotkeys () {
761 this.hotkeys = [ 782 this.hotkeys = [
762 // These hotkeys are managed by the player 783 // These hotkeys are managed by the player