-import { Component, EventEmitter, Inject, Input, LOCALE_ID, OnChanges, Output } from '@angular/core'
+import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'
import { MarkdownService, Notifier } from '@app/core'
import { VideoDetails, VideoService } from '@app/shared/shared-main'
constructor (
private videoService: VideoService,
private notifier: Notifier,
- private markdownService: MarkdownService,
- @Inject(LOCALE_ID) private localeId: string
+ private markdownService: MarkdownService
) { }
ngOnChanges () {
this.descriptionLoading = true
this.videoService.loadCompleteDescription(this.video.descriptionPath)
- .subscribe(
- description => {
+ .subscribe({
+ next: description => {
this.completeDescriptionShown = true
this.descriptionLoading = false
this.updateVideoDescription(this.completeVideoDescription)
},
- error => {
+ error: err => {
this.descriptionLoading = false
- this.notifier.error(error.message)
+ this.notifier.error(err.message)
}
- )
+ })
}
onTimestampClicked (timestamp: number) {
private async setVideoDescriptionHTML () {
const html = await this.markdownService.textMarkdownToHTML(this.video.description)
- this.videoHTMLDescription = this.markdownService.processVideoTimestamps(html)
+
+ this.videoHTMLDescription = this.markdownService.processVideoTimestamps(this.video.shortUUID, html)
}
}