|
|
@@ -4,11 +4,16 @@ type ProcessEventCallback = (event: ProcessEvent) => void; |
|
|
|
|
|
|
|
type ErrorEventCallback = (event: Error) => void; |
|
|
|
|
|
|
|
type SuccessEvent = { type: string, output: Buffer }; |
|
|
|
|
|
|
|
type SuccessEventCallback = (event: SuccessEvent) => void; |
|
|
|
|
|
|
|
export interface VideoClipEventEmitter extends NodeJS.EventEmitter { |
|
|
|
process(): void; |
|
|
|
on(eventType: 'process', callback: ProcessEventCallback): this; |
|
|
|
on(eventType: 'error', callback: ErrorEventCallback): this; |
|
|
|
on(eventType: 'end', callback: ErrorEventCallback): this; |
|
|
|
on(eventType: 'success', callback: SuccessEventCallback): this; |
|
|
|
} |
|
|
|
|
|
|
|
export const FILE_TYPES: Record<string, string> = { |
|
|
|