Re: [vibra] Vibration API -- the first stab

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