1 import { Component, Input } from '@angular/core'
2 import { VideoDetails } from '@app/shared/shared-main'
3 import { VideoState } from '@shared/models'
6 selector: 'my-video-alert',
7 templateUrl: './video-alert.component.html',
8 styleUrls: [ './video-alert.component.scss' ]
10 export class VideoAlertComponent {
11 @Input() video: VideoDetails
13 isVideoToTranscode () {
14 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
18 return this.video && this.video.state.id === VideoState.TO_EDIT
21 isVideoTranscodingFailed () {
22 return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED
25 isVideoMoveToObjectStorageFailed () {
26 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED
30 return this.video && this.video.state.id === VideoState.TO_IMPORT
33 isVideoToMoveToExternalStorage () {
34 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE
37 hasVideoScheduledPublication () {
38 return this.video?.scheduledUpdate !== undefined
42 return this.video?.state.id === VideoState.WAITING_FOR_LIVE
46 return this.video?.state.id === VideoState.LIVE_ENDED