import { ContextType } from '../activitypub/context'
import { VideoState } from '../videos'
-import { VideoEditorTaskCut } from '../videos/editor'
import { VideoResolution } from '../videos/file/video-resolution.enum'
+import { VideoStudioTaskCut } from '../videos/studio'
import { SendEmailOptions } from './emailer.model'
-export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused'
+export type JobState = 'active' | 'completed' | 'failed' | 'waiting' | 'delayed' | 'paused' | 'waiting-children'
export type JobType =
| 'activitypub-http-unicast'
| 'activitypub-http-broadcast'
+ | 'activitypub-http-broadcast-parallel'
| 'activitypub-http-fetcher'
| 'activitypub-cleaner'
| 'activitypub-follow'
| 'actor-keys'
| 'manage-video-torrent'
| 'move-to-object-storage'
- | 'video-edition'
+ | 'video-studio-edition'
export interface Job {
- id: number
- state: JobState
+ id: number | string
+ state: JobState | 'unknown'
type: JobType
data: any
priority: number
export type ActivitypubHttpBroadcastPayload = {
uris: string[]
- signatureActorId?: number
+ contextType: ContextType
body: any
- contextType?: ContextType
+ signatureActorId?: number
}
export type ActivitypubFollowPayload = {
export type ActivitypubHttpUnicastPayload = {
uri: string
+ contextType: ContextType
signatureActorId?: number
body: object
- contextType?: ContextType
}
export type RefreshPayload = {
interface BaseTranscodingPayload {
videoUUID: string
isNewVideo?: boolean
-
- // Custom notification when the task is finished
- notification?: 'default' | 'video-edition'
}
export interface HLSTranscodingPayload extends BaseTranscodingPayload {
copyCodecs: boolean
hasAudio: boolean
- isPortraitMode?: boolean
autoDeleteWebTorrentIfNeeded: boolean
isMaxQuality: boolean
hasAudio: boolean
createHLSIfNeeded: boolean
-
- isPortraitMode?: boolean
}
export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
export interface VideoLiveEndingPayload {
videoId: number
+ publishedAt: string
+ liveSessionId: number
+ streamingPlaylistId: number
+
+ replayDirectory?: string
}
export interface ActorKeysPayload {
previousVideoState: VideoState
}
-export type VideoEditorTaskCutPayload = VideoEditorTaskCut
+export type VideoStudioTaskCutPayload = VideoStudioTaskCut
-export type VideoEditorTaskIntroPayload = {
+export type VideoStudioTaskIntroPayload = {
name: 'add-intro'
options: {
}
}
-export type VideoEditorTaskOutroPayload = {
+export type VideoStudioTaskOutroPayload = {
name: 'add-outro'
options: {
}
}
-export type VideoEditorTaskWatermarkPayload = {
+export type VideoStudioTaskWatermarkPayload = {
name: 'add-watermark'
options: {
}
}
-export type VideoEditionTaskPayload =
- VideoEditorTaskCutPayload |
- VideoEditorTaskIntroPayload |
- VideoEditorTaskOutroPayload |
- VideoEditorTaskWatermarkPayload
+export type VideoStudioTaskPayload =
+ VideoStudioTaskCutPayload |
+ VideoStudioTaskIntroPayload |
+ VideoStudioTaskOutroPayload |
+ VideoStudioTaskWatermarkPayload
-export interface VideoEditionPayload {
+export interface VideoStudioEditionPayload {
videoUUID: string
- tasks: VideoEditionTaskPayload[]
+ tasks: VideoStudioTaskPayload[]
}