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
12 @Input() noPlaylistVideoFound: boolean
14 isVideoToTranscode () {
15 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
19 return this.video && this.video.state.id === VideoState.TO_EDIT
22 isVideoTranscodingFailed () {
23 return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED
26 isVideoMoveToObjectStorageFailed () {
27 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED
31 return this.video && this.video.state.id === VideoState.TO_IMPORT
34 isVideoToMoveToExternalStorage () {
35 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE
38 hasVideoScheduledPublication () {
39 return this.video?.scheduledUpdate !== undefined
43 return this.video?.state.id === VideoState.WAITING_FOR_LIVE
47 return this.video?.state.id === VideoState.LIVE_ENDED