Search code examples
audioweb-applicationsbluetoothelectronweb-bluetooth

How to route the Bluetooth audio A2DP into the audio device MediaStream ? (from electron app)


I have an app that runs locally on a Debian Linux system. The app is made with Electron and runs on Chromium.

From this app, I have access to many things, including files, locally installed programs.

At this point I use the app to make the bluetooth discovery with the web-bluetooth API: https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API

I also have a local external audio card. I can see the devices using the mediaDevices interface https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices

Does someone know How to route the Bluetooth audio A2DP into the audio device MediaStream ?


Solution

  • Web Bluetooth supports GATT aka "Bluetooth Low Energy" aka "Bluetooth Smart". A2DP is a legacy profile not supported in Web Bluetooth.