Re: [vibra] Vibration API

[ -cc public-webevents^1 ]

Hi Jose, All,

On 13.10.2011, at 20.29, ext JOSE MANUEL CANTERA FONSECA wrote:

> I think Vibration should be considered under a more general topic which is
> 'Haptic Feedback'.
> 
> One example is the technology from Immersion [1] (present in some devices
> like Galaxy S) that allows to provide more elaborated Haptic feedback to
> the user, than the old 'beep', 'beep' thing.


It is good you brought this up, because I believe we have to be smart about how we layer these things so that they work seamlessly and logically together.

My initial thinking is we should start with narrower scope and broaden from there. In v1 I'd prefer to specify what is more broadly supported today, and only in v2 delve into the rest of the sensory modalities. It is also worth noting that the group is explicitly chartered to define "an API to manage vibration".

I was thinking of the following split to make this palatable:

* Vibration API (v1)

Custom vibration effects (duration, strength etc. can be defined). High value use cases e.g. in gaming. This is what Mozilla's "WebVibrator" proposal is about.

foo.vibrate({duration: 1000, strength: 100});

* Haptic Feedback API (v2)

This would be further split in to two:

i) Abstract pre-defined haptic feedback effects such as tap, long press etc. The haptic technology used would be an implementation detail. Some platforms already give this type of feedback on actionable web controls, and this potential API should not interfere with that. This could be perhaps bound to ARIA roles.

foo.giveFeedback({type: 'tap'});

ii) Custom haptic feedback effects (use case example: let's say you want to develop an oven app, and want your virtual oven to feel hot when touched).

foo.giveFeedback({type: 'custom', temperature: 50 /* ... */});

Does this approach sound reasonable? Any feedback is welcome. And I'd especially like to hear your favorite use cases at this point.

[The method signatures are just placeholders, so let's not go down to those details yet.]

-Anssi

^1 It was proposed we should use public-device-apis ML for related discussions going forward.

Received on Friday, 14 October 2011 10:20:13 UTC