修改提示

This commit is contained in:
mtvpls
2026-03-30 09:29:53 +08:00
parent 7ea35e423d
commit b636051cf9
+6 -1
View File
@@ -1347,7 +1347,9 @@ function PlayPageClient() {
requestHeaders.Referer = `${window.location.origin}/`; requestHeaders.Referer = `${window.location.origin}/`;
} }
const response = await fetch(`${LOCAL_TRANSCODER_BASE_URL}/v1/sessions`, { let response: Response;
try {
response = await fetch(`${LOCAL_TRANSCODER_BASE_URL}/v1/sessions`, {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@@ -1362,6 +1364,9 @@ function PlayPageClient() {
refresh: false, refresh: false,
}), }),
}); });
} catch {
throw new Error('转码服务连接失败');
}
const data = await response.json().catch(() => null); const data = await response.json().catch(() => null);
if (!response.ok) { if (!response.ok) {