igorpavlov
igorpavlov

Reputation: 3626

WebRTC Chrome microphone not working

Description

Specs: Chrome version 44,45,46 both Win, Mac and Linux.

Actions made:

  1. first source: camera and microphone granted via getUserMedia
  2. second source: microphone only granted via getUserMedia
  3. both sources are stored in JS object
  4. volume level checked with WebAudio (getting peak level over 5 seconds) 3) WebRTC call
  5. established within a first source

Symptoms:

  1. volume level is detected as 0
  2. in the WebRTC call one user doesn't hear the Chrome user

Expected behavior:

  1. volume level is detected higher than 0
  2. in the WebRTC call both users hear each other

Severity: often, but not always. Doesn't seem to be tied to particular user, it happens from day to day with any user.

(!) Can sometimes be temporary fixed by restarting Chrome completely.

(!) Can sometimes be temporary fixed on Mac (until restart):

  1. Go to Mac Applications > Utilities > Terminal
  2. Copy and paste this command, then press Enter: sudo killall VDCAssistant
  3. Type in your computer password and press Enter
  4. Restart Chrome

(!) Happened even with the only one source requested.

Help

This seems to be a massive issue addressed to Google a long time ago, but still not solved. Have anyone faced it? Is there any way to fix this in JavaScript or anyhow else?

Edit 1

It is also reproducible at https://apprtc.appspot.com/ and any other webrtc websites.

Edit 2

Seems like it is WebRTC bug:

Upvotes: 2

Views: 4952

Answers (1)

Steve Tauber
Steve Tauber

Reputation: 10179

Here is a script I have in my .profile that will resolve this issue:

alias fixcam="sudo kill -9 `pgrep VDCAssistant`; sudo killall coreaudiod"

Then I just run fixcam from terminal. If you add the above command to your .profile you'll need to open a new terminal window or run source ~/.profile to reload the configuration.

It looks like the bug has been isolated to coreaudiod getting in a bad state. I haven't tested ONLY restarting coreaudiod but it's possible that will work also.

Upvotes: 1

Related Questions