1
0

status banner
All checks were successful
Test / test (push) Successful in 9m26s

This commit is contained in:
Aiden
2026-06-10 12:56:57 +10:00
parent 8402fcd640
commit 0879f1685a
8 changed files with 74 additions and 0 deletions

View File

@@ -82,6 +82,11 @@ function onDocumentReady(callback: () => void): void {
function completeXrSupportCheck(playButton: HTMLButtonElement, onComplete: () => void): void {
if (!navigator.xr) {
if (!window.isSecureContext) {
console.warn('VR_WEB_PLAYER_XR: Immersive WebXR requires a secure context. Serve the page over HTTPS, a trusted tunnel, or a deployed CDN URL to test in a headset.');
} else {
console.warn('VR_WEB_PLAYER_XR: navigator.xr is not available in this browser.');
}
markXrUnsupported(playButton);
onComplete();
return;
@@ -91,6 +96,7 @@ function completeXrSupportCheck(playButton: HTMLButtonElement, onComplete: () =>
if (supported) {
playButton.dataset.xrSupported = 'true';
} else {
console.warn('VR_WEB_PLAYER_XR: immersive-vr is not supported by this browser/device.');
markXrUnsupported(playButton);
}