mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-29 17:02:28 +00:00
Verify CDN playback before marking healthy
This commit is contained in:
1 parent
5ef94c03ba
commit
2b1d0ca26e
1 file changed
+23
-1
@@ -4561,8 +4561,30 @@ class bitvidApp {
|
||||
return { outcome: "opaque" };
|
||||
}
|
||||
|
||||
if (!response.ok) {
|
||||
const fallback = await this.probeUrlWithVideoElement(trimmed);
|
||||
if (fallback && fallback.outcome) {
|
||||
return fallback;
|
||||
}
|
||||
return {
|
||||
outcome: "bad",
|
||||
status: response.status,
|
||||
};
|
||||
}
|
||||
|
||||
const playbackCheck = await this.probeUrlWithVideoElement(trimmed);
|
||||
if (playbackCheck && playbackCheck.outcome) {
|
||||
if (playbackCheck.outcome === "ok") {
|
||||
return {
|
||||
...playbackCheck,
|
||||
status: response.status,
|
||||
};
|
||||
}
|
||||
return playbackCheck;
|
||||
}
|
||||
|
||||
return {
|
||||
outcome: response.ok ? "ok" : "bad",
|
||||
outcome: "ok",
|
||||
status: response.status,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user