import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
+import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-support.component'
import { MetaService } from '@ngx-meta/core'
import { NotificationsService } from 'angular2-notifications'
import { Observable } from 'rxjs/Observable'
@ViewChild('videoDownloadModal') videoDownloadModal: VideoDownloadComponent
@ViewChild('videoShareModal') videoShareModal: VideoShareComponent
@ViewChild('videoReportModal') videoReportModal: VideoReportComponent
+ @ViewChild('videoSupportModal') videoSupportModal: VideoSupportComponent
otherVideosDisplayed: Video[] = []
this.player.pause()
}
- let uuid = routeParams['uuid']
+ const uuid = routeParams['uuid']
+ // Video did not changed
+ if (this.video && this.video.uuid === uuid) return
+
this.videoService.getVideo(uuid).subscribe(
video => this.onVideoFetched(video),
this.videoReportModal.show()
}
+ showSupportModal () {
+ this.videoSupportModal.show()
+ }
+
showShareModal () {
this.videoShareModal.show()
}
return
}
- this.videoHTMLDescription = this.markdownService.markdownToHTML(this.video.description)
+ this.videoHTMLDescription = this.markdownService.textMarkdownToHTML(this.video.description)
}
private setVideoLikesBarTooltipText () {