视频成功 原因 token原因

This commit is contained in:
mmc
2026-05-22 08:03:30 +08:00
parent 2fcc5a13ea
commit 021d3cf384
6 changed files with 108 additions and 40 deletions

View File

@@ -47,8 +47,8 @@ export function useWebRTCPlayer(deviceId: string, url: string) {
v.style.height = '100%';
v.style.objectFit = 'contain';
videoRef.current = v;
const token = localStorage.getItem('videotoken') || JSON.parse(localStorage.getItem('userInfo') || '{}')?.token;
const token = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6Ijk2ZTQyYzJlLTYwNWMtNGU5MS05ZTJkLWE2NWUxM2VjZTMyZiJ9.l-F0LGxnfUD2WuATaHK7bYlguorGpGkkOR3Qpga7CWU1S_GiRI6U3At0gjOqx7DasZS7ChVsC_Csp6DX6HfArw"
//const token = localStorage.getItem('videotoken') || JSON.parse(localStorage.getItem('userInfo') || '{}')?.token;
const videoUrl = `${url}?token=${token}`;
try {