-export type VideoTranscodingPayload = {
- videoUUID: string
- resolution?: VideoResolution
- isNewVideo?: boolean
- isPortraitMode?: boolean
- generateHlsPlaylist?: boolean
+type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<any>
+
+const handlers: { [ id: string ]: HandlerFunction } = {
+ // Deprecated, introduced in 3.1
+ 'hls': handleHLSJob,
+ 'new-resolution-to-hls': handleHLSJob,
+
+ // Deprecated, introduced in 3.1
+ 'new-resolution': handleNewWebTorrentResolutionJob,
+ 'new-resolution-to-webtorrent': handleNewWebTorrentResolutionJob,
+
+ // Deprecated, introduced in 3.1
+ 'merge-audio': handleWebTorrentMergeAudioJob,
+ 'merge-audio-to-webtorrent': handleWebTorrentMergeAudioJob,
+
+ // Deprecated, introduced in 3.1
+ 'optimize': handleWebTorrentOptimizeJob,
+ 'optimize-to-webtorrent': handleWebTorrentOptimizeJob