Skip to content

Commit

Permalink
Improves warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
DougReeder committed Sep 29, 2024
1 parent f7338f3 commit 07650ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/tracked-controls-webvr.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports.System = registerSystem('tracked-controls-webvr', {
this.el.emit('controllersupdated', undefined, false);
}
} catch (e) {
console.warn('can\'t update controller list:', e);
console.warn('A-Frame requires additional permissions to list the gamepads. If this is running in an IFRAME, you need to add `gamepads` to the `allow` attribute. If this is running as the top-level page, the HTTP `Permissions-Policy` header must not exclude this origin in the `gamepad` directive.', e);

This comment has been minimized.

Copy link
@dmarcos

dmarcos Sep 29, 2024

Member

can the exception raise for other reasons? Instead of catching the exception I think if possible would be more accurate to detect we're in an iframe and then display a message. If the exception can fire for other reasons then this message won't be accurate

}
}
});

0 comments on commit 07650ee

Please sign in to comment.