]>
Commit | Line | Data |
---|---|---|
2453589a C |
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 | |
5a2f775a | 12 | @Input() noPlaylistVideoFound: boolean |
2453589a C |
13 | |
14 | isVideoToTranscode () { | |
15 | return this.video && this.video.state.id === VideoState.TO_TRANSCODE | |
16 | } | |
17 | ||
c729caf6 C |
18 | isVideoToEdit () { |
19 | return this.video && this.video.state.id === VideoState.TO_EDIT | |
20 | } | |
21 | ||
221ee1ad C |
22 | isVideoTranscodingFailed () { |
23 | return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED | |
24 | } | |
25 | ||
dbd9fb44 C |
26 | isVideoMoveToObjectStorageFailed () { |
27 | return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED | |
28 | } | |
29 | ||
2453589a C |
30 | isVideoToImport () { |
31 | return this.video && this.video.state.id === VideoState.TO_IMPORT | |
32 | } | |
33 | ||
0305db28 JB |
34 | isVideoToMoveToExternalStorage () { |
35 | return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE | |
36 | } | |
37 | ||
2453589a | 38 | hasVideoScheduledPublication () { |
9df52d66 | 39 | return this.video?.scheduledUpdate !== undefined |
2453589a C |
40 | } |
41 | ||
42 | isWaitingForLive () { | |
43 | return this.video?.state.id === VideoState.WAITING_FOR_LIVE | |
44 | } | |
45 | ||
46 | isLiveEnded () { | |
47 | return this.video?.state.id === VideoState.LIVE_ENDED | |
48 | } | |
49 | } |