diff options
Diffstat (limited to 'shared/models/videos')
-rw-r--r-- | shared/models/videos/studio/video-studio-create-edit.model.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/shared/models/videos/studio/video-studio-create-edit.model.ts b/shared/models/videos/studio/video-studio-create-edit.model.ts index 001d65c90..5e8296dc9 100644 --- a/shared/models/videos/studio/video-studio-create-edit.model.ts +++ b/shared/models/videos/studio/video-studio-create-edit.model.ts | |||
@@ -40,3 +40,21 @@ export interface VideoStudioTaskWatermark { | |||
40 | file: Blob | string | 40 | file: Blob | string |
41 | } | 41 | } |
42 | } | 42 | } |
43 | |||
44 | // --------------------------------------------------------------------------- | ||
45 | |||
46 | export function isVideoStudioTaskIntro (v: VideoStudioTask): v is VideoStudioTaskIntro { | ||
47 | return v.name === 'add-intro' | ||
48 | } | ||
49 | |||
50 | export function isVideoStudioTaskOutro (v: VideoStudioTask): v is VideoStudioTaskOutro { | ||
51 | return v.name === 'add-outro' | ||
52 | } | ||
53 | |||
54 | export function isVideoStudioTaskWatermark (v: VideoStudioTask): v is VideoStudioTaskWatermark { | ||
55 | return v.name === 'add-watermark' | ||
56 | } | ||
57 | |||
58 | export function hasVideoStudioTaskFile (v: VideoStudioTask): v is VideoStudioTaskIntro | VideoStudioTaskOutro | VideoStudioTaskWatermark { | ||
59 | return isVideoStudioTaskIntro(v) || isVideoStudioTaskOutro(v) || isVideoStudioTaskWatermark(v) | ||
60 | } | ||