Verify CDN playback before marking healthy

This commit is contained in:
thePR0M3TH3AN committed 2025-09-27 12:43:47 -04:00
1 parent 5ef94c03ba
commit 2b1d0ca26e
1 file changed
+23 -1
+23 -1
View File
@@ -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,
};
}