No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md

README.md

Web Device Manager API

Working draft, 14th of August 2018

Proposed, 2nd of February 2019

https://discourse.wicg.io/t/proposal-web-device-manager-api/3338

1. Admission

The Web Device Manager API is allowing the user to expose their devices included in the configuration of the machine in use. The entire operation of exposing is not going to be invoked without acceptance of the user who is the owner of the local machine in use.

The following API is going to request the user to grant a permission to read the machine's configuration and list of devices and their included setting and properties. If the user didn't grant the permissions for the web browser to read the list of devices included in the configuration of the local machine, the API will throw specific error informing the user that the operation will not be performed without acceptance to access the devices list.

2. Usage

2.1. The user would be able to access the website where they can verify the list of available devices on the local machine and check the status of their drivers. If one of the drivers is not up-to-date, then the website based on APIs properties related to the device is going to offer you a possibility to update to the latest version of the driver.

What is the current issue with the above statement?

The problem appears often, reportedly it is malware which infects local machines of users because of fake installers or fake websites which hunt users and tells them to click on the button to verify their hardware and download latest drivers which are not the case obviously.

How can we prevent above behaviour from spinning?

The following API, if implemented, will be marking the website that uses it as a trusted source of drivers update, which will not appear on the projects that mean to infects you by malware. You will not be able to implement the API if your project doesn't use HTTPS connection.

2.2. A developer who is going to create a project by using the mentioned Web API will be able to create applications with following purposes:

  • 1. Analyze data
  • 2. Test games' requirements
  • 3. Detect outdated drivers on users' machines.
  • 4. Gaming industry - Developers will be able to match performant game configuration based on the user's hardware
  • 5. E-commerce usage - create related products sliders that provides more accurate offer based on the user's hardware configuration
  • 6. Marketing usage - Ads based on current user's machine configuration
  • 7. Detection of hardware to support World community grid organization

3. Caution

Even if the browser marks the website as a trustful source to update the out-dated drivers, it doesn't exclude the user from having antivirus software installed on the local machine. The website even if marked as trustful one, can offer a malware content. The trustful mark doesn't give you a guarantee that the web page doesn't contain malware.

4. Syntax

const deviceManager = new DeviceManager({
    detailed: false,
    configuration: true
})
.then(response => response.json())
.then(data => data)
.catch(error => error);

The API is going to provide a constructor called DeviceManager that is going to take a one parameter which is an object containing two properties, listed below.

  • detailed
  • configuration

A both properties mentioned above are type of boolean.

4.1. detailed property

A detailed property helps the developer to specify and perform filtering in order to bring a significant number of devices needed to run the machine. In the really simple example, if we set the property to true we're going to receive a full list of available user's devices. If we set the property to false, we're going to receive a list of significant parts of the machine needed to run the processes

4.2. configuration property

A configuration property is having a lot to offer for developers. The property allows bringing all of the available settings and properties of the devices available on the user's machine. If we set the property to true, we're going to receive a full list of settings for a specific device as a nested object. If we set the property to false, we're going to receive a fundamental list of settings for a specific device as a nested object.

The response returned by API is going to be handled by promises.