navigator.bluetooth.requestDevice doesn't work
Reported by
eazy...@gmail.com,
Jan 17 2017
|
|||
Issue description<b>Chrome Version : <Copy from: 'about:version'></b> URLs (if applicable) : https://googlecodelabs.github.io/candle-bluetooth/ Other browsers tested: Opera FAIL What steps will reproduce the problem? (1) Follow instructions here: https://codelabs.developers.google.com/codelabs/candle-bluetooth/index.html?index=..%2F..%2Findex#1 (2) Navigate to https://googlecodelabs.github.io/candle-bluetooth/ (3) Press the green CONNECT button What is the expected result? `navigator.bluetooth.requestDevice` call should work What happens instead? Uncaught TypeError: Cannot read property 'requestDevice' of undefined at PlaybulbCandle.connect (playbulbCandle.js:21) at HTMLButtonElement.document.querySelector.addEventListener.event Please provide any additional information below. Attach a screenshot if possible.
,
Jan 18 2017
,
Jan 18 2017
#1 I have Chromium 55.0.2883.95 (Official Build) (64-bit). I was able to solve this problem by enabling bluetooth protocol in Chrome as described here https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web: chrome://flags/#enable-web-bluetooth
,
Jan 18 2017
Thanks; that's the expected behavior.
,
Jan 18 2017
#4 So going forward, in Chrome one always has to enable the bluetooth protocol explicitly before connecting to BLE devices?
,
Jan 18 2017
See comment #1.
,
Jan 19 2017
For the record, I've just updated Origin Trials token so that you don't need to enable the flag until 2017-01-24. See https://github.com/googlecodelabs/candle-bluetooth/commit/cd5ed2f7d5bad63a3b179fb22d9afa578eadc5ba
,
Jan 19 2017
#7 According to a comment above: ~"Web Bluetooth is enabled on 56 by default" How does updating Origin Trials token impact that fact?
,
Jan 19 2017
You can learn more about Origin Trials at https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web#available_for_origin_trials |
|||
►
Sign in to add a comment |
|||
Comment 1 by ortuno@chromium.org
, Jan 17 2017