]>
Commit | Line | Data |
---|---|---|
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 | @Input() noPlaylistVideoFound: boolean | |
13 | ||
14 | isVideoToTranscode () { | |
15 | return this.video && this.video.state.id === VideoState.TO_TRANSCODE | |
16 | } | |
17 | ||
18 | isVideoToEdit () { | |
19 | return this.video && this.video.state.id === VideoState.TO_EDIT | |
20 | } | |
21 | ||
22 | isVideoTranscodingFailed () { | |
23 | return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED | |
24 | } | |
25 | ||
26 | isVideoMoveToObjectStorageFailed () { | |
27 | return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE_FAILED | |
28 | } | |
29 | ||
30 | isVideoToImport () { | |
31 | return this.video && this.video.state.id === VideoState.TO_IMPORT | |
32 | } | |
33 | ||
34 | isVideoToMoveToExternalStorage () { | |
35 | return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE | |
36 | } | |
37 | ||
38 | hasVideoScheduledPublication () { | |
39 | return this.video?.scheduledUpdate !== undefined | |
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 | } |