]>
Commit | Line | Data |
---|---|---|
0c9668f7 C |
1 | export interface RunnerJobSuccessBody { |
2 | runnerToken: string | |
3 | jobToken: string | |
4 | ||
5 | payload: RunnerJobSuccessPayload | |
6 | } | |
7 | ||
8 | // --------------------------------------------------------------------------- | |
9 | ||
10 | export type RunnerJobSuccessPayload = | |
11 | VODWebVideoTranscodingSuccess | | |
12 | VODHLSTranscodingSuccess | | |
13 | VODAudioMergeTranscodingSuccess | | |
5e47f6ab | 14 | LiveRTMPHLSTranscodingSuccess | |
ab14f0e0 | 15 | VideoStudioTranscodingSuccess |
0c9668f7 C |
16 | |
17 | export interface VODWebVideoTranscodingSuccess { | |
18 | videoFile: Blob | string | |
19 | } | |
20 | ||
21 | export interface VODHLSTranscodingSuccess { | |
22 | videoFile: Blob | string | |
23 | resolutionPlaylistFile: Blob | string | |
24 | } | |
25 | ||
26 | export interface VODAudioMergeTranscodingSuccess { | |
27 | videoFile: Blob | string | |
28 | } | |
29 | ||
30 | export interface LiveRTMPHLSTranscodingSuccess { | |
31 | ||
32 | } | |
33 | ||
ab14f0e0 | 34 | export interface VideoStudioTranscodingSuccess { |
5e47f6ab C |
35 | videoFile: Blob | string |
36 | } | |
37 | ||
0c9668f7 C |
38 | export function isWebVideoOrAudioMergeTranscodingPayloadSuccess ( |
39 | payload: RunnerJobSuccessPayload | |
40 | ): payload is VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess { | |
41 | return !!(payload as VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess)?.videoFile | |
42 | } | |
43 | ||
44 | export function isHLSTranscodingPayloadSuccess (payload: RunnerJobSuccessPayload): payload is VODHLSTranscodingSuccess { | |
45 | return !!(payload as VODHLSTranscodingSuccess)?.resolutionPlaylistFile | |
46 | } |