fix: explain when the VR runtime refuses a session

Chrome only reports "The specified session configuration is not
supported" when SteamVR refuses a session, usually because another
browser holds the headset. Show what to do in the popup instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
phitandClaude Opus 5.5 committed 2026-10-06 00:30:10 +02:00
1 parent 87dd16d6d1
commit c587686bca
1 file changed
+6 -1
+6 -1
View File
@@ -191,7 +191,12 @@ function createController() {
.catch((e) => {
console.warn('video2webxr: entering VR failed:', e);
stop();
lastError = `Entering VR failed: ${e.message}`;
// what Chrome reports when SteamVR refuses the session, usually because another
// browser already holds the headset
lastError =
e.name === 'NotSupportedError'
? "The VR runtime couldn't start a session. Another browser or app may be using the headset: close it, or restart SteamVR, and try again."
: `Entering VR failed: ${e.message}`;
});
}