env.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. declare interface ImportMetaEnv {
  2. readonly VITE_APP_TITLE: string
  3. readonly VITE_BASE_API: string
  4. readonly VITE_ROUTER_HISTORY: 'hash' | 'html5'
  5. readonly VITE_PUBLIC_PATH: string
  6. readonly VITE_VIDEO_PORT: string
  7. readonly VITE_HEART_BEAT_PORT: string
  8. }
  9. interface ImportMeta {
  10. readonly env: ImportMetaEnv
  11. }
  12. /** WFS 播放器类型声明 */
  13. interface WfsStatic {
  14. isSupported(): boolean
  15. Events: {
  16. ERROR: string
  17. MANIFEST_PARSED: string
  18. [key: string]: string
  19. }
  20. ErrorTypes: {
  21. MEDIA_ERROR: string
  22. NETWORK_ERROR: string
  23. [key: string]: string
  24. }
  25. new (config?: Record<string, any>): WfsInstance
  26. }
  27. interface WfsInstance {
  28. attachMedia(video: HTMLVideoElement, channel: string, codec: string, url: string): void
  29. on(event: string, callback: (...args: any[]) => void): void
  30. off(event: string, callback: (...args: any[]) => void): void
  31. destroy(): void
  32. }
  33. interface Window {
  34. Wfs: WfsStatic
  35. }
  36. declare module '*.vue' {
  37. import { DefineComponent } from 'vue'
  38. const component: DefineComponent<{}, {}, any>
  39. export default component
  40. }