webrtc / samples

WebRTC Web demos and samples
https://webrtc.github.io/samples
BSD 3-Clause "New" or "Revised" License
13.73k stars 5.69k forks source link

Unable to utilize Bluetooth headset/microphone as expected with webRTC #1338

Open geoffschultz opened 3 years ago

geoffschultz commented 3 years ago

Please read first!

Please use discuss-webrtc for general technical discussions and questions.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed.

Browser affected

Windows Chrome 84.0.4147.105 (Windows 10 Pro V1903 - 64 bit) Windows Firefox 79.0 (64 bit) (Windows 10 Pro V1903 - 64 bit) (Note that media.setsinkid.enabled was set to true) Android Chrome 84.0.4147.111 (Android 9)

Description

I am developing a web page that uses webRTC via simple-peer for browser-to-browser audio communication. I recently got a Bluetooth headset and ran into problems where I can't simultaneously use the headset's microphone and speaker. I went back to the "Select source and output" demo that webRTC provides at https://webrtc.github.io/samples/src/content/devices/input-output/ and found the same issues.

Steps to reproduce

Connect a Bluetooth headset and run https://webrtc.github.io/samples/src/content/devices/input-output/

Expected results

I expect to be able utilize both the microphone and speaker on the headset simultaneously (or at all)

Actual results

If I use the built-in speaker and microphone on my Windows 10 computer, the demo works as expected. It also works using the built-in microphone and speaker on Android 9.

If I utilize a Bluetooth headset, things change depending upon the browser and the headset manufacturer. I have tried 3 different headset manufacturers and the only one that partially worked was the Vont VNT-BTH01.

The VNT-BTH01 worked as expected on Chrome and Firefox on Windows and on Firefox on Android 9. The microphone did not work on Android Chrome and I was not able to select the headset as an output device.

I also tried an MPOW M9 and a Conambo JBT900 headset. Neither of these worked as expected.

On Windows 10 using Chrome and Firefox, the JBT900 allowed me to output audio to the headset, but the microphone didn't work. On Android 9, the JBT900 worked as expected with Firefox, but no apparent audio input or output using Chrome.

I returned the MPOW M9 before running a full set of tests, but per my notes, on Windows I could either use the headset's microphone or speaker, but not both simultaneously.

kamenivskyi commented 2 years ago

I have the same problem on my laptop using Chrome and wireless headphones. OS Windows.

pingqiaotoufu commented 2 years ago

I have the same problem on android. I use the React Native WebRTCwith the M89 lib. In my code: `async function load_media_device(){ await mediaDevices.enumerateDevices().then(devices => devices.forEach(device => { console.log(device.kind + ": " + device.label + " id = " + device.deviceId) let el = null if ('audioinput' === device.kind) { audioinput = device.deviceId } else if ('videoinput' === device.kind) { videoinput.push(device.deviceId) has_camera = true } }) )

} ` mediaDevices.enumerateDevices() cannot find the bluetooth's mic . I have tried 3 bluetooth headset. Print as blow, line 1 is front camera,line 2 is back camera, line 3 is phone's mic. LOG videoinput: 0 id = 0 LOG videoinput: 1 id = 1 LOG audioinput: Audio id = audio-1

and I cannot use the phone's mic when the phone connect one bluetooth headset!

rabeenawash commented 8 months ago

Hi, I have the same problem, any body managed to fix it

Bilits commented 1 month ago

same here