video.d.ts 941 B

123456789101112131415161718192021222324252627282930313233
  1. /// <reference types="node" />
  2. import { VapConfig } from "./type";
  3. export default class VapVideo {
  4. constructor(options: any);
  5. options: VapConfig;
  6. private fps;
  7. requestAnim: Function;
  8. container: HTMLElement;
  9. video: HTMLVideoElement;
  10. protected events: any;
  11. private _drawFrame;
  12. protected animId: number;
  13. protected useFrameCallback: boolean;
  14. private firstPlaying;
  15. private setBegin;
  16. private customEvent;
  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) | ((cb: any) => NodeJS.Timeout);
  24. cancelRequestAnimation(): void;
  25. destroy(): void;
  26. clear(): void;
  27. on(event: any, callback: any): this;
  28. onplaying(): void;
  29. onpause(): void;
  30. onended(): void;
  31. oncanplay(): void;
  32. onerror(err: any): void;
  33. }