instrumentisto / medea-jason

Mozilla Public License 2.0
2 stars 2 forks source link

Switching between Speaker and AirPods sometimes brokes output audio on MacOS #150

Open evdokimovs opened 9 months ago

evdokimovs commented 9 months ago

Summary

When user on MacOS many times enables/disables AirPods (or most likely other bluetooth headphones) while in call, then audio stops playing on any device. Even manual output device switching through media settings not fixing it. It was reported that sometimes after AirPods reconnection audio can start to play on it and everything backs to normal (even switching to speakers), but in my tests it never happened.

Also it was reported, that adding Mutex for output audio switching on frontend side decreases chance of this bug to happen, but maybe it's just seems that way.

Platform information

MacOS specific bug. Was tested on Apple Silicon processors, on different machines, but most likely it related to any Mac because it looks like bug in Jason's MediaManager.

Steps to reproduce

  1. Start call in messenger
  2. Connect AirPods to Mac
  3. Disconnect AirPods from Mac 3.1. Do it many times until bug happens

What is the current bug behavior?

  1. Output audio is now not working

What is the expected correct behavior?

  1. Output audio should play on connected device

Possible fixes

It can be related to MediaManager of Jason, because of behaviour where even manual output device selection is not doing anything, but more in-depth investigation needed.

evdokimovs commented 9 months ago

cc @SleepySquash