Skip to content

Commit

Permalink
allow catching enterVR error
Browse files Browse the repository at this point in the history
  • Loading branch information
yakyouk committed Jul 19, 2022
1 parent 2cd12e1 commit e4c5e75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ module.exports.AScene = registerElement('a-scene', {
if (this.xrSession) {
this.xrSession.removeEventListener('end', this.exitVRBound);
}
navigator.xr.requestSession(useAR ? 'immersive-ar' : 'immersive-vr', {
return navigator.xr.requestSession(useAR ? 'immersive-ar' : 'immersive-vr', {
requiredFeatures: ['local-floor'],
optionalFeatures: ['bounded-floor']
}).then(function requestSuccess (xrSession) {
Expand Down Expand Up @@ -261,7 +261,7 @@ module.exports.AScene = registerElement('a-scene', {
attributes: presentationAttributes
}]).then(enterVRSuccess, enterVRFailure);
}
return Promise.resolve();
// return Promise.resolve();
}

// No VR.
Expand Down

0 comments on commit e4c5e75

Please sign in to comment.