Bug 217664 - No productId and vendorId returned by getGamepads API
Summary: No productId and vendorId returned by getGamepads API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 14
Hardware: All Unspecified
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-13 12:38 PDT by huangam
Modified: 2020-11-12 14:51 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description huangam 2020-10-13 12:38:24 PDT
The navigator.getGamepads() API on Safari 14 does not return the productId and vendorId inside the "id" attribute to clearly identify the gamepad - this doesn't follow the current existing convention that chrome and FF is using. 

Steps to reproduce:
1) Connect a gamepad using bluetooth or USB
2) Open Safari and go to gamepad-tester.com
3) Press any button on the gamepad and confirm it shows up on gamepad tester
4) Open Safari's web inspector, and execute "navigator.getGamepads()"
5) Observe the response

Expected: the "id" field of the gamepad contains the vendor and product id of the gamepad (e.g. "Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 09cc)"
Actual: the "id" field of the gamepad does not contain the vendor and product id of the gamepad (i.e. "Xbox Wireless Controller Extended Gamepad deviceId: 0")
Comment 1 Radar WebKit Bug Importer 2020-10-14 15:18:16 PDT
<rdar://problem/70310420>