<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access to the feature &amp;quot;gamepad&amp;quot; is disallowed by permissions policy. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-to-the-feature-quot-gamepad-quot-is/m-p/1312870#M81806</link>
    <description>&lt;P&gt;It's possible you may have shortened your description for simplicity, but disabling the gamepad according to the documentation is shown &lt;A href="https://gar.pacaf.af.mil/jsapi/4.27/sdk/api-reference/esri-views-MapView.html#navigation" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;under the description of the navigation property.&lt;/P&gt;&lt;P&gt;If you've done that and it still doesn't solve your problem, you may have to resort to overwriting the _forEachGamepad function so it doesn't cause the problem.&amp;nbsp; To do so, you'd need something like this prior to creating your MapView:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/views/input/gamepad/GamepadSource"], function(g) {
	g.GamepadSource.prototype._forEachGamepad = function(m) { console.warn("Prevented gamepad access..."); };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 22:29:42 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-07-27T22:29:42Z</dc:date>
    <item>
      <title>Access to the feature "gamepad" is disallowed by permissions policy.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-to-the-feature-quot-gamepad-quot-is/m-p/1312371#M81800</link>
      <description>&lt;P&gt;My organization recently implemented a permissions policy disallowing gamepad. I am not including any of the gamepad input modules in our application; it is not something we are actively using. I tried disabling gamepad in the MapView using&amp;nbsp;gamepad: false; however, the map chokes on load and the console reports an error.&lt;/P&gt;&lt;P&gt;Here's the error and call stack:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Uncaught DOMException: Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy.
    at w._forEachGamepad (https://js.arcgis.com/4.27/esri/views/MapView.js:284:66)
    at new z (https://js.arcgis.com/4.27/esri/views/MapView.js:281:154)
    at new g (https://js.arcgis.com/4.27/esri/views/MapView.js:271:90)
    at F._connect (https://js.arcgis.com/4.27/esri/views/MapView.js:236:292)
    at https://js.arcgis.com/4.27/esri/views/MapView.js:236:48
    at z (https://js.arcgis.com/4.27/:1717:105)
    at G.notify (https://js.arcgis.com/4.27/:182:158)
    at d (https://js.arcgis.com/4.27/:178:400)
    at F.l [as callback] (https://js.arcgis.com/4.27/:179:7)
    at d (https://js.arcgis.com/4.27/:187:15)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can fix the issue by reverting the policy, but that is a last resort option for our organization. Any ideas on how to prevent the map from trying to call getGamepads?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 23:24:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-to-the-feature-quot-gamepad-quot-is/m-p/1312371#M81800</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2023-07-26T23:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Access to the feature "gamepad" is disallowed by permissions policy.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-to-the-feature-quot-gamepad-quot-is/m-p/1312870#M81806</link>
      <description>&lt;P&gt;It's possible you may have shortened your description for simplicity, but disabling the gamepad according to the documentation is shown &lt;A href="https://gar.pacaf.af.mil/jsapi/4.27/sdk/api-reference/esri-views-MapView.html#navigation" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;under the description of the navigation property.&lt;/P&gt;&lt;P&gt;If you've done that and it still doesn't solve your problem, you may have to resort to overwriting the _forEachGamepad function so it doesn't cause the problem.&amp;nbsp; To do so, you'd need something like this prior to creating your MapView:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require(["esri/views/input/gamepad/GamepadSource"], function(g) {
	g.GamepadSource.prototype._forEachGamepad = function(m) { console.warn("Prevented gamepad access..."); };
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 22:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/access-to-the-feature-quot-gamepad-quot-is/m-p/1312870#M81806</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-07-27T22:29:42Z</dc:date>
    </item>
  </channel>
</rss>

