feat:计算视频帧传来的差值

This commit is contained in:
nnbcccscdscdsc
2026-04-02 15:29:49 +08:00
parent 1e828cc036
commit 51ea86e887
6 changed files with 294 additions and 26 deletions

View File

@@ -1,4 +1,4 @@
import type { DashboardSnapshot } from '@/types'
import type { DashboardSnapshot, VideoStatus } from '@/types'
const envBaseUrl = import.meta.env.VITE_API_BASE_URL as string | undefined
@@ -16,6 +16,10 @@ export function fetchDashboardSnapshot() {
return fetchJson<DashboardSnapshot>('/api/dashboard/')
}
export function fetchVideoStatus() {
return fetchJson<VideoStatus>('/api/video/status/')
}
export function buildVideoFrameUrl(frameKey: number) {
return `${API_BASE}/api/video/frame/?frame=${frameKey}&t=${Date.now()}`
}