Parse failed video playback errors when in public instances

This commit is contained in:
Natsumi
2025-05-08 00:41:37 +10:00
parent f04d27ac6b
commit e69ca26842

View File

@@ -621,6 +621,8 @@ namespace VRCX
// 2024.07.31 22:28:47 Error - [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
// 2024.07.31 23:04:15 Error - [AVProVideo] Error: Loading failed. File not found, codec not supported, video resolution too high or insufficient system resources.
// 2025.05.04 22:38:12 Error - Attempted to play an untrusted URL (Domain: localhost) that is not allowlisted for public instances. If this URL is needed for the world to work, the domain needs to be added to the world's Video Player Allowed Domains list on the website.
const string youtubeBotError = "Sign in to confirm youre not a bot";
const string youtubeBotErrorFixUrl = "\n[VRCX]: We've made a program to help with this error, you can try it out here: https://github.com/EllyVR/VRCVideoCacher";
@@ -666,6 +668,24 @@ namespace VRCX
return true;
}
if (line.Contains("Attempted to play an untrusted URL"))
{
var data = line.Substring(offset);
if (data == logContext.LastVideoError)
return true;
logContext.LastVideoError = data;
AppendLog(new[]
{
fileInfo.Name,
ConvertLogTimeToISO8601(line),
"event",
"VideoError: " + data
});
return true;
}
return false;
}