Bluetooth
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Bluetooth interface of the Web Bluetooth API provides methods to query Bluetooth availability and request access to devices.
Instance properties
Inherits properties from its parent EventTarget.
Instance methods
Bluetooth.getAvailability()-
Returns a
Promisethat resolves to a boolean value indicating whether the user agent can support Bluetooth. Some user agents let the user configure an option that specifies what value is returned by this method. Bluetooth.getDevices()-
Returns a
Promisethat resolves to an array ofBluetoothDevices this origin is allowed to access. Permission is obtained via previous calls toBluetooth.requestDevice(). Bluetooth.requestDevice()-
Returns a
Promisethat resolves to aBluetoothDeviceobject matching the specified options.
Specifications
| Specification |
|---|
| Web Bluetooth # bluetooth |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bluetooth
|
|
|
|
|
|
|
|
|
|
|
|
|
getAvailability
|
|
|
|
|
|
|
|
|
|
|
|
|
getDevices
|
|
|
|
|
|
|
|
|
|
|
|
|
requestDevice
|
|
|
|
|
|
|
|
|
|
|
|
|
options.exclusionFilters parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
options.filter.manufacturerData parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.
- User must explicitly enable this feature.
- Has more compatibility info.