- From: Anssi Kostiainen <anssi.kostiainen@nokia.com>
- Date: Tue, 1 Nov 2011 11:59:48 -0700
- To: "public-device-apis@w3.org WG" <public-device-apis@w3.org>, public-device-status@w3.org, ext Deepanshu gautam <deepanshu.gautam@huawei.com>
Hi All, On 28.10.2011, at 19.29, ext Deepanshu gautam wrote: > Have you thought about having an option to control the Intensity (low, Medium, High) of the vibration? > It would be useful for many applications like evolving-alarm, games etc. > > > void vibrate() > optional double? pattern > Vibration duration in milliseconds > Option string intLevel > Intensity level for the vibration > > > navigator.vibration.vibrate([2000], H); > or even.... > navigator.vibration.vibrate([{1000, L}, {500}, {2000, M}, {300}, {3000,H}]) Yes, I've thought this a bit. Some questions to all: * First, does someone have concerns with adding support for intensity (API design details aside) to the spec? * Type of double scaled from 0 to 1.0 or type of DOMString low|medium|high or something else? I'd like to note that implementations should obey the platform level vibration intensity setting. For example, when a "meeting" or similar profile is selected, the device is typically set to vibrate only slightly, and in such a case 1.0 or "high" would represent the maximum platform capped (e.g. profile setting) intensity. * Is everyone fine with overloading vibrate() with intensity, or should we carve this functionality out into its own method? Deepanshu - Thanks for the proposal! -Anssi
Received on Tuesday, 1 November 2011 19:02:54 UTC