GithubHelp home page GithubHelp logo

vibration's Introduction

Vibration API

This repository contains the Vibration API specification.

vibration's People

Contributors

anssiko avatar dontcallmedom avatar foolip avatar rakuco avatar reillyeon avatar xfq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vibration's Issues

Updating privacy considerations to reflect recomentations.

I think we should consider updating the considerations to reflect some of the discussions on the lists (including PING), to specify more direct recommendations (including, more directly, this one https://lists.w3.org/Archives/Public/public-device-apis/2016Feb/0072.html_. Can we go with the following?

Vibration API is not a source of data on its own and as such is not producing any data possible to consume on the Web. However, it is known that it can serve as a source of events for other APIs. In particular, it is known that certain sensors such as accelerometers or gyroscopes are prone to tiny imperfections during their manufacturing. As such, they provide a fingerprinting surface that can be exploited utilizing the vibration stimuli generated via the Vibration API. In this sense, Vibration API provides an indirect privacy risk, in conjunction with other mechanisms. This can create possibly unexpected privacy risks, including cross-device tracking and communication. Additionally, a device that is vibrating might be visible to external observers and enable physical identification, and possibly tracking of the user.

For these reasons, the user agent SHOULD inform about the past and present use of the API. Additionally, the user agent MUST allow a mechanism of limiting the the potential of using the API to create vibration patterns.

Updating privacy considerations - recovery of two identifiers

Hello,

After carefully analyzing the spec, it seems it could be possible to actually recover the max patterns list and max duration length values. While at this moment there is no actual apparent risk since the current implementers appear to limit the max pattern length to 128 and max duration to 10 seconds, it is not clear what could be implementing the spec in the future.

For example, an algorithm monitors DeviceOrientation events and causes a single vibration, increasing the duration while tracking the time when device is vibrating. At some point, the time would stop to ascend, indicating the platform's max duration. This is an identifier.

We could update the privacy considerations to reflect this, i.e.

"It is theoretically possible to recover the values of max length and max duration using external detection sensors. In some scenarios, those values could act as identifiers."

Once again, this concerns a situation where in some case, e.g. Web of Things devices, those values would start to be different. In any case, this would make the spec future proof.

ISSUE-146: Add vibration strength control

Any ETA/status for my proposed "Add vibration strength control" https://www.w3.org/2009/dap/track/issues/146 ?

Maybe iOS now supports vibration strength control, or needed to open issue/proposal for Apple. Anyway after standard is proposed, vendors must/expected to fallow it. I think standards proposal must be made before vendors began its own implementation in non-standard way.


Vibration API strength proposal with stair-stepping/smooth volume
reduce/increase:

navigator.vibrate([
    {
        "time": 200, // Required property.
        "volume": [0, 80] // Minimum 0, maximum 100, default 100. [0, 80] smooth volume increase - starts volume strength at 0 and smoothly increases to 80 till end.
    },
    {
        "time": 1000, // 1000 ms
        "delay": 50, // Will start vibrate after 50 ms. Default 0 ms
        "volume": [0, 100, 0] // Smooth volume reduce-increase-reduce - starts at 0, smoothly increases to 100 in 50 ms and smooth reduce to 0 at end.
    },
    {
        "time": 200,
        "volume": [50] // Stair-stepping volume - will start and end volume strength 50.
    }
]);

or the same in simplified version without keys:

navigator.vibrate([{200, [0, 80]}, {1000, 50, [0, 100, 0]}, {200, [50]}]);

and single 1s vibrate with full strength and without delay:

navigator.vibrate({1000});

Privacy considerations

Vibration can be used in conjunction with other techniques to enhance fingerprinting.

Vibration is also often externally visible, so causing a device to vibrate can be used by a third party able to observe locally to identify the device in question.

api.Navigator.vibrate - Throwing intervention error of vibration after user already interacted with UI.

Google Chrome Version 87.0.4280.88 (Official Build) (x86_64)

What information was incorrect, unhelpful, or incomplete?

Missing one Vibration API to check whether developer can trigger vibration or not.

What did you expect to see?

Allow me to trigger vibration when user interact with UI elements.

Did you test this? If so, how?

I tried to trigger vibration after element clicked (click and on hold), and trigger event in touchmove, but if finger still on hold, vibrate API will still assume user not yet interact, and throw error below.

[Intervention] Blocked call to navigator.vibrate because user hasn't tapped on the frame or any embedded frame yet: .

MDN page report details

Vibration should require user's permission

It looks like an omission that Notifications API requires user's permission to issue notifications which also include vibration patterns, but the Vibration API doesn't require any sort of permission. There is a provision in the "Security and privacy considerations" section that UA should provide mechanism for disabling the API but there is already a standard mechanism for that purpose, the Permissions API. I suggest adding explicit user permission requirement instead of the general provision of an unspecified disabling mechanism.

Vibration does not work in silent mode.

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.