env.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. readonly VITE_WEBRTC_SIGNAL_IP: string
  11. readonly VITE_WEBRTC_SIGNAL_PORT: string
  12. }
  13. interface ImportMeta {
  14. readonly env: ImportMetaEnv
  15. }
  16. /** WFS 播放器类型声明 */
  17. interface WfsStatic {
  18. isSupported(): boolean
  19. Events: {
  20. ERROR: string
  21. MANIFEST_PARSED: string
  22. [key: string]: string
  23. }
  24. ErrorTypes: {
  25. MEDIA_ERROR: string
  26. NETWORK_ERROR: string
  27. [key: string]: string
  28. }
  29. new (config?: Record<string, any>): WfsInstance
  30. }
  31. interface WfsInstance {
  32. attachMedia(video: HTMLVideoElement, channel: string, codec: string, url: string): void
  33. on(event: string, callback: (...args: any[]) => void): void
  34. off(event: string, callback: (...args: any[]) => void): void
  35. destroy(): void
  36. }
  37. interface Window {
  38. Wfs: WfsStatic
  39. }
  40. declare module '*.vue' {
  41. import { DefineComponent } from 'vue'
  42. const component: DefineComponent<{}, {}, any>
  43. export default component
  44. }