Hammerspoon / Spoons

The official repository of Spoon plugins
https://www.hammerspoon.org/Spoons/
450 stars 141 forks source link

✨ Add MS Teams support for MicMute Spoon #306

Closed rshmhrj closed 1 year ago

rshmhrj commented 1 year ago

Hi @dctucker, thanks for creating this awesome tool! I wanted this functionality to work for MS Teams, so tried to add it in.

I used your Zoom if block for reference as well as this geekersdigest article.

The big difference is hs.eventtap.keyStroke({"cmd","shift"}, "m", 0, teams) vs. something like teams:selectMenuItem'Unmute' (which didn't seem to work when I tested it).

It seems to work fine for the most part. In the happy case, MicMute (MM) is muted, and when I join Teams with a large number of people, it automatically starts muted. So toggling off mute works right off the bat.

In other cases, I need to fiddle with one or the other until they are in sync, and I don't know yet how to solve for it:

Would be nice to add some logic:

I hope this PR is a step in the right direction.

dctucker commented 1 year ago

In other cases, I need to fiddle with one or the other until they are in sync

This is my experience in Zoom too. I just always join with audio muted and press my toggle mute hotkey until the application is synchronized with the actual mute status. It's not exactly ideal, but at least it works predictably and reliably without requiring a ton of extra error checking.

cmsj commented 1 year ago

Thanks both!