aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/runners/runner-job-update-body.model.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/runners/runner-job-update-body.model.ts')
-rw-r--r--shared/models/runners/runner-job-update-body.model.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/shared/models/runners/runner-job-update-body.model.ts b/shared/models/runners/runner-job-update-body.model.ts
new file mode 100644
index 000000000..ed94bbe63
--- /dev/null
+++ b/shared/models/runners/runner-job-update-body.model.ts
@@ -0,0 +1,28 @@
1export interface RunnerJobUpdateBody {
2 runnerToken: string
3 jobToken: string
4
5 progress?: number
6 payload?: RunnerJobUpdatePayload
7}
8
9// ---------------------------------------------------------------------------
10
11export type RunnerJobUpdatePayload = LiveRTMPHLSTranscodingUpdatePayload
12
13export interface LiveRTMPHLSTranscodingUpdatePayload {
14 type: 'add-chunk' | 'remove-chunk'
15
16 masterPlaylistFile?: Blob | string
17
18 resolutionPlaylistFilename?: string
19 resolutionPlaylistFile?: Blob | string
20
21 videoChunkFilename: string
22 videoChunkFile?: Blob | string
23}
24
25export function isLiveRTMPHLSTranscodingUpdatePayload (value: RunnerJobUpdatePayload): value is LiveRTMPHLSTranscodingUpdatePayload {
26 // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
27 return !!(value as LiveRTMPHLSTranscodingUpdatePayload)?.videoChunkFilename
28}