[vibration] Returning false if vibration hardware is not present?

The vibration api is currently spec'd to return false from vibrate(...) if
the page is not visible or (optionally) if the user has disabled vibration.
Can the spec be amended to return false if vibration hardware is not
present too?

Some mobile devices such as the Nexus 7 do not have hardware support for
vibration. I'd like to provide feedback to users when their hardware
doesn't support vibration. There is an Android API for accessing this:
Vibration.hasVibrator(), though I couldn't find an API on iOS.

Ideally we would return a promise but that change is probably not web
compatible. Another option is to add something like hasVibrator(). Because
false is already returned for a variety of cases where vibration is not
possible, I think it makes sense to also return false when hardware support
prevents vibration.

Received on Tuesday, 19 January 2016 20:12:32 UTC