video.d.ts 793 B

123456789101112131415161718192021222324252627
  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. private events;
  11. private _drawFrame;
  12. private animId;
  13. private firstPlaying;
  14. precacheSource(source: any): Promise<string>;
  15. initVideo(): void;
  16. drawFrame(): void;
  17. play(): void;
  18. requestAnimFunc(): ((cb: any) => number) | ((cb: any) => NodeJS.Timeout);
  19. cancelRequestAnimation(): void;
  20. destroy(): void;
  21. clear(): void;
  22. on(event: any, callback: EventListenerObject): this;
  23. onplaying(): void;
  24. onpause(): void;
  25. onended(): void;
  26. onerror(err: any): void;
  27. }