Skip to content

Commit

Permalink
check policy
Browse files Browse the repository at this point in the history
  • Loading branch information
LeXXik committed Oct 11, 2024
1 parent cea6b42 commit ffde9de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/framework/xr/xr-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,14 @@ class XrManager extends EventHandler {
* @private
*/
_sessionSupportCheck(type) {
const featurePolicy = document?.featurePolicy;
if (featurePolicy) {
const allowed = featurePolicy.allowsFeature('xr-spatial-tracking');
if (!allowed) {
return;
}
}

navigator.xr.isSessionSupported(type).then((available) => {
if (this._available[type] === available) {
return;
Expand Down

0 comments on commit ffde9de

Please sign in to comment.