]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/shared/metadata/video-attributes.component.ts
Add support for saving video files to object storage (#4290)
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / shared / metadata / video-attributes.component.ts
CommitLineData
c894a1ea
C
1import { Component, Input } from '@angular/core'
2import { VideoDetails } from '@app/shared/shared-main'
3
4@Component({
5 selector: 'my-video-attributes',
6 templateUrl: './video-attributes.component.html',
7 styleUrls: [ './video-attributes.component.scss' ]
8})
9export class VideoAttributesComponent {
10 @Input() video: VideoDetails
11
12 getVideoUrl () {
13 if (!this.video.url) {
14 return this.video.originInstanceUrl + VideoDetails.buildWatchUrl(this.video)
15 }
16
17 return this.video.url
18 }
19
7e8f1960
C
20 getVideoHost () {
21 return this.video.channel.host
22 }
23
c894a1ea
C
24 getVideoTags () {
25 if (!this.video || Array.isArray(this.video.tags) === false) return []
26
27 return this.video.tags
28 }
29}