]>
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 | |
12 | ||
13 | isVideoToTranscode () { | |
14 | return this.video && this.video.state.id === VideoState.TO_TRANSCODE | |
15 | } | |
16 | ||
17 | isVideoToImport () { | |
18 | return this.video && this.video.state.id === VideoState.TO_IMPORT | |
19 | } | |
20 | ||
21 | hasVideoScheduledPublication () { | |
22 | return this.video && this.video.scheduledUpdate !== undefined | |
23 | } | |
24 | ||
25 | isWaitingForLive () { | |
26 | return this.video?.state.id === VideoState.WAITING_FOR_LIVE | |
27 | } | |
28 | ||
29 | isLiveEnded () { | |
30 | return this.video?.state.id === VideoState.LIVE_ENDED | |
31 | } | |
32 | } |