+ async removeVideo (event: Event) {
+ event.preventDefault()
+
+ const res = await this.confirmService.confirm('Do you really want to delete this video?', 'Delete')
+ if (res === false) return
+
+ this.videoService.removeVideo(this.video.id)
+ .subscribe(
+ status => {
+ this.notificationsService.success('Success', `Video ${this.video.name} deleted.`)
+
+ // Go back to the video-list.
+ this.redirectService.redirectToHomepage()
+ },
+
+ error => this.notificationsService.error('Error', error.message)
+ )
+ }
+
+ acceptedPrivacyConcern () {
+ peertubeLocalStorage.setItem(VideoWatchComponent.LOCAL_STORAGE_PRIVACY_CONCERN_KEY, 'true')
+ this.hasAlreadyAcceptedPrivacyConcern = true
+ }
+
+ private updateVideoDescription (description: string) {
+ this.video.description = description
+ this.setVideoDescriptionHTML()
+ }
+
+ private setVideoDescriptionHTML () {
+ if (!this.video.description) {
+ this.videoHTMLDescription = ''
+ return
+ }
+
+ this.videoHTMLDescription = this.markdownService.textMarkdownToHTML(this.video.description)
+ }
+
+ private setVideoLikesBarTooltipText () {
+ this.likesBarTooltipText = `${this.video.likes} likes / ${this.video.dislikes} dislikes`