video.d.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { VapConfig } from './type';
  2. export default class VapVideo {
  3. options: VapConfig;
  4. requestAnim: (cb: any) => number;
  5. container: HTMLElement;
  6. video: HTMLVideoElement;
  7. protected events: {
  8. [key: string]: Array<(...info: any[]) => void>;
  9. };
  10. private _drawFrame;
  11. protected animId: number;
  12. protected useFrameCallback: boolean;
  13. private firstPlaying;
  14. private setBegin;
  15. private customEvent;
  16. setOptions(options: VapConfig): this;
  17. precacheSource(source: any): Promise<string>;
  18. initVideo(): void;
  19. drawFrame(_: any, _info: any): void;
  20. play(): void;
  21. pause(): void;
  22. setTime(t: any): void;
  23. requestAnimFunc(): (cb: any) => number;
  24. cancelRequestAnimation(): void;
  25. clear(): void;
  26. destroy(): void;
  27. on(event: any, callback: any): this;
  28. once(event: any, callback: any): this;
  29. trigger(eventName: any, ...e: any[]): void;
  30. offAll(): this;
  31. onplaying(): void;
  32. oncanplay(): void;
  33. onerror(err: any): void;
  34. }