env.d.ts 1.1 KB

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