w3c / vibration

Vibration API
https://w3c.github.io/vibration/
Other
12 stars 11 forks source link

Vibration does not work in silent mode. #28

Closed doong-jo closed 2 years ago

doong-jo commented 2 years ago

Vibration does not work when the mobile device settings are silent mode. Did you intent? If so, this seems to be stated together in the document.

Or do not you have a way to vibrate when it is silent mode?

anssiko commented 2 years ago

Vibration does not work when the mobile device settings are silent mode. Did you intent? If so, this seems to be stated together in the document.

Thanks for your question. The following step allows implementers to follow conventions of the host OS in this regard, so this will vary depending on the OS:

An implementation MAY return false and terminate these steps. NOTE For example, an implementation might abort the algorithm because no vibration hardware is present, the user has set a preference indicating that pages at a given origin should never be able to vibrate the device, or an implementation might cap the total amount of time a page may cause the device to vibrate and reject requests in excess of this limit.

https://w3c.github.io/vibration/#dfn-perform-vibration

Please note the list in this note is open-ended.

Or do not you have a way to vibrate when it is silent mode?

There is no way to ensure vibrate will work in silent mode across all OSes. That is by design, to ensure privacy.

Hopefully this addressed your questions.

doong-jo commented 2 years ago

Thanks, anssiko