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

>* 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.

I wouldn't mind either, but prefer DOMString

>* Is everyone fine with overloading vibrate() with intensity, or should we carve this functionality out into its own method?

Intensity being the feature of the current vibration, overloading vibrate() seems to be reasonable. Having a new method will be bit cumbersome for the developers.


Regards


Deepanshu Gautam
Service Standards, Huawei Software
T: +86 25 5260008 M: +86 135 85147627

-----Original Message-----
From: Anssi Kostiainen [mailto:anssi.kostiainen@nokia.com] 
Sent: Wednesday, November 02, 2011 3:00 AM
To: public-device-apis@w3.org WG; public-device-status@w3.org; Deepanshu gautam
Subject: 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 Wednesday, 2 November 2011 01:11:26 UTC