このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

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 読取専用

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

BluetoothDevice.name 読取専用

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

BluetoothDevice.gatt 読取専用

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

インスタンスメソッド

BluetoothDevice.watchAdvertisements()

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

BluetoothDevice.forget()

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

仕様書

Specification
Web Bluetooth
# bluetoothdevice-interface

ブラウザーの互換性