]> 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 1540021209b5404e413991315259b08e1a8461e8..b56a51fbf7ce16685b4cfae11fc7fc1e9d5cf477 100644 (file)
@@ -1,8 +1,7 @@
 import { Component, Input, ViewChild } from '@angular/core'
-import { MarkdownService } from '@app/videos/shared'
-
 import { VideoDetails } from '../../../shared/video/video-details.model'
 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
+import { MarkdownService } from '@app/shared/renderer'
 
 @Component({
   selector: 'my-video-support',
@@ -12,7 +11,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
 export class VideoSupportComponent {
   @Input() video: VideoDetails = null
 
-  @ViewChild('modal') modal: NgbModal
+  @ViewChild('modal', { static: true }) modal: NgbModal
 
   videoHTMLSupport = ''
 
@@ -22,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)
   }
 }