[web-bluetooth] Adding simple manufacturer id filtering support (#544)

beaufortfrancois has just created a new issue for https://github.com/WebBluetoothCG/web-bluetooth:

== Adding simple manufacturer id filtering support ==
Adding manufacturer id filtering support would help some web developers [today][1].

For info, the simple `manufacturerId` filter was [removed][2] in favor of a more sophisticated one long time ago but I believe it may worth exploring having both.
I have a simple CL that works just fine at https://chromium-review.googlesource.com/c/chromium/src/+/2825891. What do you folks think? @reillyeon @scheib 

```javascript
const device = await navigator.bluetooth.requestDevice({ filters: [{ manufacturerId: 0x00e0 }] });
```

Side note: While I was playing with it on macOS, I've noticed there was only one unique manufacturer data key (the last one set in advertisement flags) while other platforms support multiple ones as described in the Bluetooth spec. We may want to rethink `manufacturerData` then as it allows several ones today in the spec.

[1]: https://stackoverflow.com/a/67070652/422957
[2]: https://github.com/WebBluetoothCG/web-bluetooth/pull/297

Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/544 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 April 2021 13:24:17 UTC