BluetoothAdvertisingData

非标
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The BluetoothDevice interface of the Web Bluetooth API provides advertising data about a particular Bluetooth device.

Interface

interface BluetoothAdvertisingData {
  readonly attribute unsigned short? appearance;
  readonly attribute byte? txPower;
  readonly attribute byte? rssi;
  readonly attribute Map manufacturerData;
  readonly attribute Map serviceData;
};
					

特性

BluetoothAdvertisingData.appearance 只读
Returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
BluetoothAdvertisingData.txPower 只读
Returns the transmission power at which the device is broadcasting, measured in dBm. This is used to compute the path loss as this.txPower - this.rssi .
BluetoothAdvertisingData.rssi 只读
Returns the power at which the device’s packets are being received, measured in dBm. This is used to compute the path loss as this.txPower - this.rssi .
BluetoothAdvertisingData.manufacturerData 只读
Returns a map that relates Company Identifier Codes to ArrayBuffers .
BluetoothAdvertisingData.serviceData 只读
Returns a map that relates UUIDs to ArrayBuffers .

方法

None.

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
BluetoothAdvertisingData
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No
appearance
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No
manufacturerData
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No
rssi
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No
serviceData
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No
txPower
弃用 非标
Chrome No Edge No Firefox No IE No Opera ? Safari No WebView Android No Chrome Android No Firefox Android No Opera Android ? Safari iOS No Samsung Internet Android No

图例

不支持
不支持
兼容性未知
兼容性未知
非标。预期跨浏览器支持较差。
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
弃用。不要用于新网站。