Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit c8a6a4e

Browse files
committed
Add check for isSecureContext before inline session
1 parent f481b00 commit c8a6a4e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Assets/WebGLTemplates/WebXR/webxr.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@
216216
})
217217
);
218218

219+
if (!window.isSecureContext) {
220+
this.inlineSession = false;
221+
return;
222+
}
223+
219224
navigator.xr.isSessionSupported('inline').then((supported) => {
220225
if (supported) {
221226
navigator.xr.requestSession('inline').then((session) => {

Build/webxr.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@
216216
})
217217
);
218218

219+
if (!window.isSecureContext) {
220+
this.inlineSession = false;
221+
return;
222+
}
223+
219224
navigator.xr.isSessionSupported('inline').then((supported) => {
220225
if (supported) {
221226
navigator.xr.requestSession('inline').then((session) => {

0 commit comments

Comments
 (0)