--- title: Bluetooth slug: Web/API/Bluetooth tags: - API - 接口 - 网页蓝牙接口说明 - 蓝牙 - 说明 translation_of: Web/API/Bluetooth ---
{{ apiref("Web Bluetooth API") }} {{Non-standard_header()}}
Web Bluetooth API 的Bluetooth接口返回指代{{domxref("BluetoothDevice")}}带有指定选项的对象的{{jsxref("Promise")}}。
interface Bluetooth {
Promise<BluetoothDevice> requestDevice(RequestDeviceOptions options);
};
Bluetooth implements EventTarget;
Bluetooth implements BluetoothDeviceEventHandlers;
Bluetooth implements CharacteristicEventHandlers;
Bluetooth implements ServiceEventHandlers;
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('Web Bluetooth', '#bluetooth', 'Bluetooth')}} | {{Spec2('Web Bluetooth')}} | Initial definition. |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | {{CompatChrome (45.0)}} [1] |
| Feature | Android | Android Webview | Firefox Mobile (Gecko) | Firefox OS | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|---|---|
| Basic support | {{CompatNo}} | {{CompatNo}} | {{CompatChrome (48.0)}} [2] |
[1] 注意事项:仅谷歌浏览器可用
[2] 注意事项:仅安卓6以上可用