blob: 5cb77f0c86ed4455248089167340906eee1a8ab6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { Component, Input } from '@angular/core'
import { VideoDetails } from '@app/shared/shared-main'
@Component({
selector: 'my-video-attributes',
templateUrl: './video-attributes.component.html',
styleUrls: [ './video-attributes.component.scss' ]
})
export class VideoAttributesComponent {
@Input() video: VideoDetails
getVideoUrl () {
if (!this.video.url) {
return this.video.originInstanceUrl + VideoDetails.buildWatchUrl(this.video)
}
return this.video.url
}
getVideoTags () {
if (!this.video || Array.isArray(this.video.tags) === false) return []
return this.video.tags
}
}
|