feat: add support for Web Bluetooth pin pairing (#35416)

* feat: add bluetooth pairing handler

* Update docs/api/session.md

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* Update docs/api/session.md

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* docs: update based on review

* Apply suggestions from code review

Co-authored-by: Erick Zhao <erick@hotmail.ca>
Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: update docs per review

* chore: cleanup callback per review

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit is contained in:
John Kleinschmidt 2022-09-26 10:19:58 -04:00 committed by GitHub
parent f8077cc004
commit 697a219bcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 234 additions and 6 deletions

View file

@ -16,6 +16,10 @@ with bluetooth devices. In order to use this API in Electron, developers will
need to handle the [`select-bluetooth-device` event on the webContents](../api/web-contents.md#event-select-bluetooth-device)
associated with the device request.
Additionally, [`ses.setBluetoothPairingHandler(handler)`](../api/session.md#sessetbluetoothpairinghandlerhandler-windows-linux)
can be used to handle pairing to bluetooth devices on Windows or Linux when
additional validation such as a pin is needed.
### Example
This example demonstrates an Electron application that automatically selects