修改提示
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user