feat: 增加日志模块
This commit is contained in:
@@ -24,6 +24,19 @@ export function buildVideoFrameUrl(frameKey: number) {
|
||||
return `${API_BASE}/api/video/frame/?frame=${frameKey}&t=${Date.now()}`
|
||||
}
|
||||
|
||||
export async function postVideoDisplayProbe(payload: Record<string, unknown>) {
|
||||
const response = await fetch(`${API_BASE}/api/video/display-probe/`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(payload),
|
||||
})
|
||||
if (!response.ok) {
|
||||
throw new Error(`display probe post failed: ${response.status} ${response.statusText}`)
|
||||
}
|
||||
}
|
||||
|
||||
export function buildControlWebSocketUrl() {
|
||||
const url = new URL(API_BASE, window.location.origin)
|
||||
const basePath = url.pathname.replace(/\/$/, '')
|
||||
|
||||
Reference in New Issue
Block a user