4 ms·
Websites can't trivially scan nearby devices, as far as I'm aware. You can ask for devices with a given set of features, and then the browser provides UX to se
by gsnedders 8y ago
Websites can't trivially scan nearby devices, as far as I'm aware.
You can ask for devices with a given set of features, and then the browser provides UX to select a device, and then the JS API provides a handle for that device.
The only potential way would be requesting devices with various filters, and seeing which return NotFoundError after a given time (though I don't think scanning for Bluetooth devices takes a deterministic time on any platform?) to determine which filters match something. Though of course you can only request the devices list after user interaction.