]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
Fix audio only transcoding
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / shared / information / video-alert.component.ts
CommitLineData
2453589a
C
1import { Component, Input } from '@angular/core'
2import { VideoDetails } from '@app/shared/shared-main'
3import { 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})
10export class VideoAlertComponent {
11 @Input() video: VideoDetails
12
13 isVideoToTranscode () {
14 return this.video && this.video.state.id === VideoState.TO_TRANSCODE
15 }
16
221ee1ad
C
17 isVideoTranscodingFailed () {
18 return this.video && this.video.state.id === VideoState.TRANSCODING_FAILED
19 }
20
2453589a
C
21 isVideoToImport () {
22 return this.video && this.video.state.id === VideoState.TO_IMPORT
23 }
24
0305db28
JB
25 isVideoToMoveToExternalStorage () {
26 return this.video && this.video.state.id === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE
27 }
28
2453589a 29 hasVideoScheduledPublication () {
9df52d66 30 return this.video?.scheduledUpdate !== undefined
2453589a
C
31 }
32
33 isWaitingForLive () {
34 return this.video?.state.id === VideoState.WAITING_FOR_LIVE
35 }
36
37 isLiveEnded () {
38 return this.video?.state.id === VideoState.LIVE_ENDED
39 }
40}