Skip to content
jackcarey edited this page Jul 16, 2022 · 1 revision

Type: String

The id of the gamepad.

The format of the id is not standardized and may to be different from browser to browser. It will likely contain two 4-digit hex strings, representing the USB vendor and product id of the gamepad, and the name of the gamepad as reported by the driver.

Example

var controller = Controller.getController(0);
console.log(controller.id);

// Chrome
>> "Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 05c4)"

// Firefox
>> "54c-5c4-Wireless Controller"
Clone this wiki locally