BluetoothDevice

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。

Web Bluetooth APIBluetoothDevice インターフェイスは、特定のスクリプト実行環境下における Bluetooth デバイスを表します。

EventTarget BluetoothDevice

インスタンスプロパティ

BluetoothDevice.id Experimental 読取専用

デバイスを一意に識別する文字列です。

BluetoothDevice.name Experimental 読取専用

デバイスの人間にわかりやすい名前を表す文字列です。

BluetoothDevice.gatt Experimental 読取専用

デバイスの BluetoothRemoteGATTServer への参照です。

インスタンスメソッド

BluetoothDevice.watchAdvertisements() Experimental

undefined で解決するか、アドバタイズが何らかの理由で表示できない場合はエラーで拒否される Promise を返します。

BluetoothDevice.forget() Experimental

ユーザーがアクセスを許可したデバイスへのアクセスを無効化します。

仕様書

Specification
Web Bluetooth
# bluetoothdevice-interface

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
BluetoothDevice
Experimental
gatt
Experimental
gattserverdisconnected event
Experimental
id
Experimental
name
Experimental

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.
Has more compatibility info.