]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
Add basic video editor support
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / shared / information / video-alert.component.ts
1 import { Component, Input } from '@angular/core'
2 import { VideoDetails } from '@app/shared/shared-main'
3 import { VideoState } from '@shared/models'
4
5 @Component({
6 selector: 'my-video-alert',
7 templateUrl: './video-alert.component.html',
8 styleUrls: [ './video-alert.component.scss' ]
9 })
10 export class VideoAlertComponent {
11 @Input() video: VideoDetails
12
13 isVideoToTranscode () {
14 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
15 }
16
17 isVideoToEdit () {
18 return this.video && this.video.state.id === VideoState.TO_EDIT
19 }
20
21 isVideoTranscodingFailed () {
22 return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED
23 }
24
25 isVideoMoveToObjectStorageFailed () {
26 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED
27 }
28
29 isVideoToImport () {
30 return this.video && this.video.state.id === VideoState.TO_IMPORT
31 }
32
33 isVideoToMoveToExternalStorage () {
34 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE
35 }
36
37 hasVideoScheduledPublication () {
38 return this.video?.scheduledUpdate !== undefined
39 }
40
41 isWaitingForLive () {
42 return this.video?.state.id === VideoState.WAITING_FOR_LIVE
43 }
44
45 isLiveEnded () {
46 return this.video?.state.id === VideoState.LIVE_ENDED
47 }
48 }