Easiest Way to Get Mute Status

Description
My goal is to interface an Elgato Stream Deck to be used as a Zoom Controller. There are a couple of examples of this using Global Shortcut Keys and it works well. However, the mute status of the Stream Deck can get out of sync with Zoom (host changes mute status, muted via UC headset, Zoom client, etc.).

All I want is to extract the mute status of the current user in their current Zoom meeting (Windows only). I could then use the shortcut keys to actually mute and unmute.

What is the easiest way to do this?

Which version?
Windows only

Is the Windows SDK the easiest way to go about this?
It looks like I could run the following commands within inMeetingService.

GetUserID(0)
virtual AudioStatus IUserAudioStatus::GetStatus ()

Would the app need to join the meeting and be listed as another meeting attendee? Or would it just “work” with the Windows Zoom client?

Hi jeff2,

Thanks for using Zoom SDK. The interface you are mentioning is the right way to get the audio status. If you are using SDK to get meeting info, you must join the meeting and be listed as a meeting attendee. If you do not want to join the meeting and get the meeting info, you may consider using Zoom REST API such as:

Hope this helps. Thanks!

Did you manage to make any progress on this @jeff2?
I’d be happy to contribute in any way I can towards getting a proper Zoom Mute button working.

I have not made any progress in this. I am an engineer that just pretends to know how to do some coding. I usually code by taking examples and just making minor tweaks and I think this is beyond my skill set.

I would love for someone to help contribute. Is this something you have the skills for?

Sadly I’m in the same boat skillswise. I’ll ask some of my colleagues and see if I can find something.

Thanks for this.

Just to be clear I can use the Zoom REST API to get the meeting ID and not be listed as a meeting attendee. However, I still can’t obtain my mute status with the REST API. I will need the Web SDK, be listed as a meeting attendee, etc.

Hi @jeff2,

Thanks for the reply. For the issue you are facing, you might to ask the API & WebSDK experts:

Hope this helps. Thanks!

There is a new StreamDeck plugin that is for OSX only right now. I don’t have a mac, but it looks like it uses AppleScript to get the mute status.

Is there a way to do this using PowerShell or something similar on Windows? This could be a good way to get the mute (as well as video and screen sharing status) without joining as a separate user to the room).

json getZoomStatus() {
   // get Zoom Mute status
  // ESDDebug("APPLESCRIPT_GET_STATUS: %s", APPLESCRIPT_GET_STATUS);
  char* zoomStatus = execAndReturn(
"osascript -e 'set zoomStatus to \"closed\"\nset muteStatus to "
"\"muted\"\nset videoStatus to \"stopped\"\nset shareStatus to "
"\"stopped\"\ntell application \"System Events\"\nif exists (window 1 of "
"process \"zoom.us\") then\nset zoomStatus to \"open\"\nend if\nend "
"tell\nif (zoomStatus contains \"open\") then\ntell application \"System "
"Events\" to tell application process \"zoom.us\"\nif exists (menu item "
"\"Mute audio\" of menu 1 of menu bar item \"Meeting\" of menu bar 1) "
"then\nset muteStatus to \"unmuted\"\nelse\nset muteStatus to "
"\"muted\"\nend if\nif exists (menu item \"Start Video\" of menu 1 of menu "
"bar item \"Meeting\" of menu bar 1) then\nset videoStatus to "
"\"stopped\"\nelse\nset videoStatus to \"started\"\nend if\nif exists "
"(menu item \"Start Share\" of menu 1 of menu bar item \"Meeting\" of menu "
"bar 1) then\nset shareStatus to \"stopped\"\nelse\nset shareStatus to "
"\"started\"\nend if\nend tell\nend if\ndo shell script \"echo mute:\" & "
"(muteStatus as text) & \",video:\" & (videoStatus as text) & \",zoom:\" & "
"(zoomStatus as text) & \",share:\" & (shareStatus as text)'");
  std::string status = std::string(zoomStatus);

Thanks for sharing this. As this is out of the scope of what this forum is for and what we could support, so I do not have an answer to your question.

Thanks!

So I made a bit of progress on this.

I discovered the UIAutomation capability in windows. Specifically I found this Python project on GitHub. https://github.com/yinkaisheng/Python-UIAutomation-for-Windows

I am able to use their examples and when a Zoom meeting is in progress I can use a modified example to get the menu items from the Zoom Tools Menu. Specifically the output looks like the quoted text at the bottom of this post. I went through and bolded the interesting parts. As you can see if you extra key values from this text you could get the status of: Mute, Video, Screen Share, and Recording!

I am not much of a coder, so I am struggling to put it all together. But it should be possible to make a simple Python script that queries this and updates a simple JSON file with the current status of the mute, video, screen sharing, and recording. That can be used by other tools. Is anyone able to help?

ControlType: WindowControl ClassName: ZPControlPanelClass AutomationId: Rect: (2845,1032,3756,1085)[911x53] Name: Meeting Tools Handle: 0x100EEC(1052396) Depth: 0 SupportedPattern: LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2845,1032,3756,1085)[911x53] Name: Handle: 0x0(0) Depth: 1 SupportedPattern: LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2845,1032,2847,1085)[2x53] Name: Handle: 0x0(0) Depth: 2 SupportedPattern: LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (2847,1034,2935,1083)[88x49] Name: Unmute, currently muted, Alt+A Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2847,1034,2935,1083)[88x49] Name: Handle: 0x0(0) Depth: 3 SupportedPattern: LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2847,1034,2913,1083)[66x49] Name: Handle: 0x0(0) Depth: 4 SupportedPattern: LegacyIAccessiblePattern
ControlType: MenuItemControl ClassName: AutomationId: Rect: (2913,1036,2933,1062)[20x26] Name: Audio Settings Handle: 0x0(0) Depth: 4 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (2935,1034,3033,1083)[98x49] Name: start my video, Alt+V Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2935,1034,3033,1083)[98x49] Name: Handle: 0x0(0) Depth: 3 SupportedPattern: LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (2935,1034,3011,1083)[76x49] Name: Handle: 0x0(0) Depth: 4 SupportedPattern: LegacyIAccessiblePattern
ControlType: MenuItemControl ClassName: AutomationId: Rect: (3011,1036,3031,1062)[20x26] Name: Video Settings… Handle: 0x0(0) Depth: 4 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (3033,1032,3130,1085)[97x53] Name: Handle: 0x0(0) Depth: 2 SupportedPattern: LegacyIAccessiblePattern
ControlType: MenuItemControl ClassName: AutomationId: Rect: (3130,1034,3210,1083)[80x49] Name: Security Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (3210,1034,3300,1083)[90x49] Name: Closed, open participants pane… Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (3300,1034,3380,1083)[80x49] Name: Open Chat Panel, Alt+H Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (3380,1034,3478,1083)[98x49] Name: Share Screen, Alt+S Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (3380,1034,3478,1083)[98x49] Name: Handle: 0x0(0) Depth: 3 SupportedPattern: LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (3380,1034,3456,1083)[76x49] Name: Handle: 0x0(0) Depth: 4 SupportedPattern: LegacyIAccessiblePattern
ControlType: MenuItemControl ClassName: AutomationId: Rect: (3456,1036,3476,1062)[20x26] Name: Share Option Handle: 0x0(0) Depth: 4 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: MenuItemControl ClassName: AutomationId: Rect: (3478,1034,3558,1083)[80x49] Name: Record Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern
ControlType: PaneControl ClassName: AutomationId: Rect: (3558,1032,3656,1085)[98x53] Name: Handle: 0x0(0) Depth: 2 SupportedPattern: LegacyIAccessiblePattern
ControlType: ButtonControl ClassName: AutomationId: Rect: (3682,1044,3744,1072)[62x28] Name: End, Alt+Q Handle: 0x0(0) Depth: 2 SupportedPattern: InvokePattern LegacyIAccessiblePattern

In case this is useful to anyone else, I figured out how to do this using a Python script and threw something up on GitHub. Let me know if there are any suggestions for improvements. I am not a developer and just hacked something together.

Thanks for sharing this!