chromium/components/media_device_salt/README.md

# MediaDeviceSalt Component

Some Web and Extension APIs expose media devices (i.e., microphones and cameras) to applications using IDs. The [Media Capture and Streams](https://w3c.github.io/mediacapture-main/#dom-devicepermissiondescriptor-deviceid) spec says device IDs must be persistent and unique for top-level documents of the same origin. The reason they must be unique per origin is to avoid cross-origin tracking.

To satisfy this requirement, Chromium exposes device IDs generated by hashing the origin, the real device ID and a random persistent salt. This allows the IDs to be unique per origin, mappable back to the real device IDs, and resettable (by replacing the salt).

The service implemented in this directory allows clients to read and reset the salt used to generate Web-exposed media device IDs. Resetting a salt has the effect of invalidating previous persistent device IDs, so it is equivalent to deleting browsing data such as cookies.