aboutsummaryrefslogtreecommitdiffhomepage
path: root/packages/models/src/runners/runner-job-success-body.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/models/src/runners/runner-job-success-body.model.ts')
-rw-r--r--packages/models/src/runners/runner-job-success-body.model.ts46
1 files changed, 46 insertions, 0 deletions
diff --git a/packages/models/src/runners/runner-job-success-body.model.ts b/packages/models/src/runners/runner-job-success-body.model.ts
new file mode 100644
index 000000000..f45336b05
--- /dev/null
+++ b/packages/models/src/runners/runner-job-success-body.model.ts
@@ -0,0 +1,46 @@
1export interface RunnerJobSuccessBody {
2 runnerToken: string
3 jobToken: string
4
5 payload: RunnerJobSuccessPayload
6}
7
8// ---------------------------------------------------------------------------
9
10export type RunnerJobSuccessPayload =
11 VODWebVideoTranscodingSuccess |
12 VODHLSTranscodingSuccess |
13 VODAudioMergeTranscodingSuccess |
14 LiveRTMPHLSTranscodingSuccess |
15 VideoStudioTranscodingSuccess
16
17export interface VODWebVideoTranscodingSuccess {
18 videoFile: Blob | string
19}
20
21export interface VODHLSTranscodingSuccess {
22 videoFile: Blob | string
23 resolutionPlaylistFile: Blob | string
24}
25
26export interface VODAudioMergeTranscodingSuccess {
27 videoFile: Blob | string
28}
29
30export interface LiveRTMPHLSTranscodingSuccess {
31
32}
33
34export interface VideoStudioTranscodingSuccess {
35 videoFile: Blob | string
36}
37
38export function isWebVideoOrAudioMergeTranscodingPayloadSuccess (
39 payload: RunnerJobSuccessPayload
40): payload is VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess {
41 return !!(payload as VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess)?.videoFile
42}
43
44export function isHLSTranscodingPayloadSuccess (payload: RunnerJobSuccessPayload): payload is VODHLSTranscodingSuccess {
45 return !!(payload as VODHLSTranscodingSuccess)?.resolutionPlaylistFile
46}