BluetoothCharacteristicProperties

Limited availability

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

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

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

Web Bluetooth APIBluetoothCharacteristicProperties インターフェイスは、指定の BluetoothRemoteGATTCharacteristic で有効な操作を提供します。

このインターフェイスは、BluetoothRemoteGATTCharacteristic.properties を呼ぶと返されます。

インスタンスプロパティ

authenticatedSignedWrites 読取専用 Experimental

キャラクタリスティックの値への署名付き書き込みが許可されているならば true となる boolean 値を返します。

broadcast 読取専用 Experimental

Server Characteristic Configuration Descriptor によりキャラクタリスティックの値のブロードキャストが許可されているならば true となる boolean 値を返します。

indicate 読取専用 Experimental

キャラクタリスティックの値のアクノリッジメントありのインジケーションが許可されているならば true となる boolean 値を返します。

notify 読取専用 Experimental

キャラクタリスティックの値のアクノリッジメントなしのノーティフィケーションが許可されているならば true となる boolean 値を返します。

read 読取専用 Experimental

キャラクタリスティックの値の読み取りが許可されているならば true となる boolean 値を返します。

reliableWrite 読取専用 Experimental

キャラクタリスティックへの信頼性のある書き込みが許可されているならば true となる boolean 値を返します。

writableAuxiliaries 読取専用 Experimental

キャラクタリスティックディスクリプターへの信頼性のある書き込みが許可されているならば true となる boolean 値を返します。

write 読取専用 Experimental

キャラクタリスティックへのレスポンスありの書き込みが許可されているならば true となる boolean 値を返します。

writeWithoutResponse 読取専用 Experimental

キャラクタリスティックへのレスポンスなしの書き込みが許可されているならば true となる boolean 値を返します。

以下の例では、GATT キャラクタリスティックが値の変化の通知に対応しているかを調べる方法を示します。

js
let device = await navigator.bluetooth.requestDevice({
  filters: [{ services: ["heart_rate"] }],
});
let gatt = await device.gatt.connect();
let service = await gatt.getPrimaryService("heart_rate");
let characteristic = await service.getCharacteristic("heart_rate_measurement");
if (characteristic.properties.notify) {
  characteristic.addEventListener(
    "characteristicvaluechanged",
    async (event) => {
      console.log(`心拍数測定の受信: ${event.target.value}`);
    },
  );
  await characteristic.startNotifications();
}

仕様書

Specification
Web Bluetooth
# characteristicproperties-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
BluetoothCharacteristicProperties
Experimental
authenticatedSignedWrites
Experimental
broadcast
Experimental
indicate
Experimental
notify
Experimental
read
Experimental
reliableWrite
Experimental
writableAuxiliaries
Experimental
write
Experimental
writeWithoutResponse
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.