Clip Web videos.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
699 B

  1. type ProcessEvent = { type: string, phase: string, command?: string };
  2. type ProcessEventCallback = (event: ProcessEvent) => void;
  3. type ErrorEventCallback = (event: Error) => void;
  4. export interface VideoClipEventEmitter extends NodeJS.EventEmitter {
  5. process(): void;
  6. on(eventType: 'process', callback: ProcessEventCallback): this;
  7. on(eventType: 'error', callback: ErrorEventCallback): this;
  8. on(eventType: 'end', callback: ErrorEventCallback): this;
  9. }
  10. export const FILE_TYPES: Record<string, string> = {
  11. mkv: 'video/x-matroska',
  12. webm: 'video/webm',
  13. mp4: 'video/mp4',
  14. };
  15. export interface CreateBaseClipperParams {
  16. url: string;
  17. start?: number | string;
  18. end?: number | string;
  19. }