Quick answer: Construct 3 gamepad vibration not stopping when the controller disconnects? Browser holds the vibration command on the disconnected device; reconnection inherits the stuck state.
A long vibration triggered as the controller unplugs; next session it’s the first thing the player feels.
Cap Vibration Duration
Always pass a finite duration to vibration calls. Infinite or very-long durations risk getting stuck on disconnect.
Stop on Disconnect Event
On gamepad disconnected:
Gamepad: Stop vibration on gamepad 0Reset on every disconnect event. Doesn’t always reach the device but clears your code’s view of state.
Reset on Re-Connect
On reconnect, send a 0-strength short vibration to reset the channel state. The fresh command supersedes the stuck one.
Browser Quirks
Firefox, Chrome, Edge handle gamepad lifecycle differently. Test disconnect / reconnect on each.
Verifying
Disconnecting mid-vibration doesn’t leave the controller buzzing. Reconnecting feels clean.
“Cap vibration durations and reset on disconnect / reconnect events.”
Pair every Start Vibration with an explicit Stop on a timer — defensive against any code path forgetting to stop.