New issue
Advanced search Search tips

Issue 817012 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Backgrounded tabs should stop gamepad vibration

Project Member Reported by mattreynolds@chromium.org, Feb 27 2018

Issue description

Chrome Version: (65.0.3325.88 (Official Build) beta (64-bit)
OS: All

What steps will reproduce the problem?

0. Ensure Chrome is configured for gamepad vibration and a gamepad that supports vibration effects is connected.
1. Open two tabs, one with html5gamepad.com and one with google.com
2. With the html5gamepad.com tab active, press a button on the gamepad. The page should now display it in the list.
3. Open the dev console and play a vibration effect that starts a different vibration effect once the first is complete. E.g. something like:

var pads = navigator.getGamepads();
var pad = pads[0];
pad.vibrationActuator.playEffect('dual-rumble', {
  duration: 5000,
  strongMagnitude: 1.0
}).then((p) => {
  pad.vibrationActuator.playEffect('dual-rumble', {
    duration: 5000,
    weakMagnitude: 1.0
  });
});

4. While the first effect is playing, switch tabs so the html5gamepad tab is backgrounded.

What is the expected result?

Only the first effect is played.


What happens instead?

The both effects are played even though the tab was backgrounded before the second effect was started.

 

Comment 1 by treib@chromium.org, Feb 28 2018

I think it'd be good, both from privacy as well as user experience POV, if any ongoing vibration effect were canceled once the corresponding tab gets backgrounded.
Owner: mattreynolds@chromium.org
Status: Started (was: Available)
Summary: Backgrounded tabs should stop gamepad vibration (was: Backgrounded tabs should ignore gamepad vibration)
Sounds good, let's make backgrounded tabs stop their ongoing effects as well.

Sign in to add a comment