aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/videos/studio/video-studio-create-edit.model.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-04 15:29:34 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commit5e47f6ab984a7d00782e4c7030afffa1ba480add (patch)
tree1ce586b591a8d71acbc301eba29b9a5e6490439e /shared/models/videos/studio/video-studio-create-edit.model.ts
parent6a4905602636afd6650c9e6f4d0fcc2105d91100 (diff)
downloadPeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.gz
PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.zst
PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.zip
Support studio transcoding in peertube runner
Diffstat (limited to 'shared/models/videos/studio/video-studio-create-edit.model.ts')
-rw-r--r--shared/models/videos/studio/video-studio-create-edit.model.ts18
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
46export function isVideoStudioTaskIntro (v: VideoStudioTask): v is VideoStudioTaskIntro {
47 return v.name === 'add-intro'
48}
49
50export function isVideoStudioTaskOutro (v: VideoStudioTask): v is VideoStudioTaskOutro {
51 return v.name === 'add-outro'
52}
53
54export function isVideoStudioTaskWatermark (v: VideoStudioTask): v is VideoStudioTaskWatermark {
55 return v.name === 'add-watermark'
56}
57
58export function hasVideoStudioTaskFile (v: VideoStudioTask): v is VideoStudioTaskIntro | VideoStudioTaskOutro | VideoStudioTaskWatermark {
59 return isVideoStudioTaskIntro(v) || isVideoStudioTaskOutro(v) || isVideoStudioTaskWatermark(v)
60}