2023-04-21 14:55:10 +02:00
|
|
|
export interface RunnerJobSuccessBody {
|
|
|
|
runnerToken: string
|
|
|
|
jobToken: string
|
|
|
|
|
|
|
|
payload: RunnerJobSuccessPayload
|
|
|
|
}
|
|
|
|
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
export type RunnerJobSuccessPayload =
|
|
|
|
VODWebVideoTranscodingSuccess |
|
|
|
|
VODHLSTranscodingSuccess |
|
|
|
|
VODAudioMergeTranscodingSuccess |
|
2023-05-04 15:29:34 +02:00
|
|
|
LiveRTMPHLSTranscodingSuccess |
|
2023-05-04 15:55:51 +02:00
|
|
|
VideoStudioTranscodingSuccess
|
2023-04-21 14:55:10 +02:00
|
|
|
|
|
|
|
export interface VODWebVideoTranscodingSuccess {
|
|
|
|
videoFile: Blob | string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VODHLSTranscodingSuccess {
|
|
|
|
videoFile: Blob | string
|
|
|
|
resolutionPlaylistFile: Blob | string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface VODAudioMergeTranscodingSuccess {
|
|
|
|
videoFile: Blob | string
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface LiveRTMPHLSTranscodingSuccess {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2023-05-04 15:55:51 +02:00
|
|
|
export interface VideoStudioTranscodingSuccess {
|
2023-05-04 15:29:34 +02:00
|
|
|
videoFile: Blob | string
|
|
|
|
}
|
|
|
|
|
2023-04-21 14:55:10 +02:00
|
|
|
export function isWebVideoOrAudioMergeTranscodingPayloadSuccess (
|
|
|
|
payload: RunnerJobSuccessPayload
|
|
|
|
): payload is VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess {
|
|
|
|
return !!(payload as VODHLSTranscodingSuccess | VODAudioMergeTranscodingSuccess)?.videoFile
|
|
|
|
}
|
|
|
|
|
|
|
|
export function isHLSTranscodingPayloadSuccess (payload: RunnerJobSuccessPayload): payload is VODHLSTranscodingSuccess {
|
|
|
|
return !!(payload as VODHLSTranscodingSuccess)?.resolutionPlaylistFile
|
|
|
|
}
|