forked from EXT/VR180-Web-Player
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user