Bug 217664

Summary: No productId and vendorId returned by getGamepads API
Product: WebKit Reporter: huangam
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Major CC: beidson, juberti, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 14   
Hardware: All   
OS: Unspecified   

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>