]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/modal/video-support.component.ts
Pause the video when a modal is opened
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / modal / video-support.component.ts
index deb8fbc6759f5cd3521e93840e166b29ba577fbf..b56a51fbf7ce16685b4cfae11fc7fc1e9d5cf477 100644 (file)
@@ -11,7 +11,7 @@ import { MarkdownService } from '@app/shared/renderer'
 export class VideoSupportComponent {
   @Input() video: VideoDetails = null
 
-  @ViewChild('modal') modal: NgbModal
+  @ViewChild('modal', { static: true }) modal: NgbModal
 
   videoHTMLSupport = ''
 
@@ -21,7 +21,9 @@ export class VideoSupportComponent {
   ) { }
 
   show () {
-    this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support)
     this.modalService.open(this.modal)
+
+    this.markdownService.enhancedMarkdownToHTML(this.video.support)
+      .then(r => this.videoHTMLSupport = r)
   }
 }