Coder Social home page Coder Social logo

chrisregado / streamdeck-googlemeet Goto Github PK

View Code? Open in Web Editor NEW
313.0 19.0 27.0 537 KB

A Stream Deck plugin to manage your Google Meet microphone and camera.

License: MIT License

JavaScript 29.02% Python 70.98%
elgato streamdeck elgato-stream-deck streamdeck-plugin streamdeck-sdk googlemeet google-meet google-meet-extension stream-deck chrome-extension

streamdeck-googlemeet's Introduction

Stream Deck Google Meet Plugin

Screenshot

This is a plugin that allows the Elgato Stream Deck to control your camera and microphone in a Google Meet call. It provides toggle buttons that show whether your camera and mic are on or off, and they update whenever you press a Stream Deck button or mute/unmute directly in Meet. It also provides some other buttons to control various elements of the Meet web UI.

This plugin works in conjuction with our Google Chrome web extension, which is required for this plugin to function.

Developed and tested primarily on macOS 11.2, Python 3.8.5, Chrome 89, and Stream Deck app v5.0.0. It should work on Windows as well.

Installing

  1. If you're running on an Apple Silicon Mac (e.g. an M1 chip), you must have Apple's Rosetta 2 installed. If you don't (or if you're not sure), open Terminal and run this command:
softwareupdate --install-rosetta --agree-to-license
  1. From the Releases page, download the com.chrisregado.googlemeet.streamDeckPlugin package and open it. The Stream Deck desktop software will prompt you to install the plugin.
  2. The Chrome extension is not in the web store, so we'll install it manually from source. From the Releases page, download the source code zip and extract it somewhere you can keep it. (If you move the folder after installing, Chrome will remove the extension from your browser and you'll have to re-add it.)
  3. From Chrome's Extension settings (chrome://extensions/), turn on "Developer mode" using the toggle in the top-right corner.
  4. Click the "Load unpacked" button in the top-left corner, and select the browser-extension folder from the zip you extracted earlier.
  5. You can turn Developer mode back off now if you want.
  6. If you use an ad blocker (such as uBlock Origin with the EasyPrivacy filter list), you may have to add meet.google.com as a trusted site in your blocker's settings to allow the Chrome Extension to work. (Some filters block websockets to 127.0.0.1, which this extension needs to communicate with the Stream Deck.)
  7. Add the buttons to your Stream Deck, and start a Google Meet call to try them out!

It's safe to delete the com.chrisregado.googlemeet.streamDeckPlugin file once it's installed. However, on Windows, you may need to quit the Stream Deck desktop software (by right clicking its icon in the Windows task tray and clicking Quit) and re-launch it to avoid "action can't be completed because the file is open" errors.

Updating

To update the Stream Deck plugin, download and open the new plugin package just like when you initially installed it. If you experience any glitches after updating (such as on/off icons not changing on the toggle buttons), please try deleting your Meet buttons and re-adding them to your Stream Deck in the Stream Deck desktop app.

To update the Chrome extension, uninstall your existing version by clicking Remove on the Chrome Extension Settings page, and then follow the installation instructions again to install the new version.

Uninstalling

In Chrome, go to your Extensions Settings page (chrome://extensions/), and click the Remove button for Stream Deck Google Meet Actions.

In the Stream Deck desktop app, right click on one of the Google Meet actions in the list on the right-hand side of the window, and click the "Uninstall..." button.

Screenshot

How It Works

The Stream Deck plugin launches a localhost-only Websocket server on port 2394, which our browser extension connects to. The plugin and browser extension send messages back and forth over that websocket to notify the Stream Deck when Meet changes its device on/off status, and simulates Meet mute button clicks in your browser when you press a key on your Stream Deck.

The Stream Deck plugin code is in the streamdeck-plugin directory. The Chrome extension code is in the browser-extension directory. The com.chrisregado.googlemeet.sdPlugin directory becomes our Stream Deck plugin distributable once we bundle our code, and contains our Stream Deck assets.

Developing the Stream Deck Plugin

First Time Setup

The plugin is written in Python. Create a venv to hold your package's dependencies, and install those dependencies:

MacOS:

cd streamdeck-plugin
python3 -m venv venv/
source venv/bin/activate
pip install -r requirements.txt

Windows:

cd streamdeck-plugin
python3 -m venv venv/
venv\Scripts\activate.bat
pip install -r requirements.txt

Remember that virtualenvs are not portable. If you move this folder at all, you'll have to delete the venv and re-create it.

Running Unit Tests

MacOS:

cd streamdeck-plugin
source venv/bin/activate
python -m unittest

Windows:

cd streamdeck-plugin
venv\Scripts\activate.bat
python -m unittest

Bundling

We use pyinstaller to bundle our code, dependencies, and a Python runtime environment into an executable. We put that executable into the com.chrisregado.googlemeet.sdPlugin folder, which in turn gets zipped up by the Elgato DistributionTool as our final distributable plugin package. That plugin package ends up including any assets we need (e.g. icons), the manifest.json file that defines our plugin for the Stream Deck desktop app, and our executable plugin code. Double-click that plugin package and the Stream Deck software will prompt you to install it.

To build the bundle:

MacOS:

cd streamdeck-plugin
source venv/bin/activate
rm -rf ../com.chrisregado.googlemeet.sdPlugin/dist/macos
pyinstaller --clean --dist "../com.chrisregado.googlemeet.sdPlugin/dist/macos" src/main.py
rm -rf build

Windows:

cd streamdeck-plugin
venv\Scripts\activate.bat
rmdir /q /s "..\com.chrisregado.googlemeet.sdPlugin\dist\windows"
pyinstaller --clean --dist "..\com.chrisregado.googlemeet.sdPlugin\dist\windows" src\main.py
rmdir /q /s build

Note that the resulting executable is only valid for the OS you built it on. MacOS and Windows bundles must be created separately from a machine/VM of that OS, and then combined into the com.chrisregado.googlemeet.sdPlugin/dist/ folder with macos and windows subdirectories for release.

If you're just testing locally (so you only care about one OS), you can place any file in the other OS's executable location (CodePaths from manifest.json) to appease the Elgato DistributionTool. Example:

mkdir -p com.chrisregado.googlemeet.sdPlugin/dist/windows/main
touch com.chrisregado.googlemeet.sdPlugin/dist/windows/main/main.exe

Or, if you don't ever plan on publishing your local builds, delete the other OS's CodePath and OS entry in manifest.json so you don't have to worry about multi-OS support.

Finally, use the DistributionTool to bundle everything into the Stream Deck plugin distributable that you can send to users:

./DistributionTool -b -i ./com.chrisregado.googlemeet.sdPlugin -o ~/Desktop/

Developing the Chrome Extension

Follow the usual "Load unpacked" installation instructions described above, pointing Chrome at the browser-extension folder of your workspace. You can then reload the extension directly from source using the reload button on Chrome's Extension Settings page. See https://developer.chrome.com/extensions/getstarted for more details.

Contributing

Feel free to contribute a feature or bug fix by opening a pull request. If you discover any problems or have any suggestions, please open a GitHub Issue.

Credits

This project was inspired by https://github.com/JeroenVdb/streamdeck-googlemeet.

Neither this app nor its creator are affiliated with or endorsed by Google. The Google Meet name and logo are the exclusive property of Google.

Fonts for the actions and keys utilize rendered characters from the Noto Emoji and Noto Color Emoji fonts, under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) https://fonts.google.com/noto/specimen/Noto+Color+Emoji?query=emoji&noto.query=emoji&preview.text=%F0%9F%92%96&preview.text_type=custom https://fonts.google.com/noto/specimen/Noto+Emoji?query=emoji&noto.query=emoji&preview.text=%F0%9F%92%96&preview.text_type=custom

streamdeck-googlemeet's People

Contributors

alainrk avatar chrisregado avatar dalcarobo avatar farnots avatar jdinocco avatar kydronepilot avatar samjgalbraith avatar willnorris avatar woehrl01 avatar zoness32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

streamdeck-googlemeet's Issues

Cough Button

Press and hold a button to mute the microphone (google or system?).

New action: send message

Send text message.

This is IMO, THE missing action. That would allow a BRB multiaction for instance where:

  • a short message is sent to the chat, like "I will be back in sec"
  • cam and audio are muted

Does not work with another google user

Hi,

It works very well with my main user.
But when I connect to another user on my google meet, it does not work at all.

Do you have any idea for that?

Detect Meet browser tab, switch StreamDeck pages

Might sound a little silly, but I'd find it hugely useful if the StreamDeck would magically switch to the Meet management page (I've got most of your buttons on it, and find them tremendously helpful) if I'm on a meet.google.com browser tab.

Safari Extension

Any chance of a Safari Browser plugin for this? I tried converting the chrome plugin myself using the Xcode tool with no success.

Streamdeck plugin not opening websocket server

I've been trying to track down why the plugin & extension refuse to work. The browser extension fails to connect to the websocket server. Initially thought this was due to organization configuration with the browser, but I looked a bit deeper and it seems that the ws server is never started up. No relevant logs or failures. I'm not sure where to continue looking… Anyone experienced this or have an idea how to fix?

  • StreamDeck v6.0.2 (17735)
  • MacBook Pro 2021, Apple M1 Max
  • Ventura 13.1
> nc -vz localhost 2394                                                                                                                                                                                                       
nc: connectx to localhost port 2394 (tcp) failed: Connection refused
nc: connectx to localhost port 2394 (tcp) failed: Connection refused

StreamDeck0.log

14:51:58.9398          int dbgcommand(): using log file '/Users/paularmstrong/Library/Logs/ElgatoStreamDeck/StreamDeck0.log'
14:51:58.9936          int main(): Using preferences from /Users/paularmstrong/Library/Preferences/com.elgato.StreamDeck.plist
14:51:59.0880          void EGQTTranslationManager::LoadLocalizations(): Could not load the 'en_US' localization
14:51:59.0880          void EGQTTranslationManager::LoadLocalizations(): Could not load the Qt 'en_US' localization
14:51:59.0920          int main(): Compiled with Qt 6.3.1 ; SSL: Secure Transport, macOS 13.1
14:51:59.0920          int main(): Runtime SSL Supported: 1
14:51:59.0920          int main(): Runtime SSL version used: Secure Transport, macOS 13.1
14:51:59.0921          int main(): Start Stream Deck App -> Version: 6.0.2
14:51:59.1298          bool ESDCUEHub::init(): ### [CUESDK] init
14:51:59.1298          bool ESDVSDServer::init(): ### [SERVER] init
14:51:59.1301          void ESDCustomPluginCommunication::start(): Using port 28196 to communicate with plugins
14:51:59.1301          void ESDPluginManager::LoadPluginsFromCore(): Load plugins from core...
14:52:00.5504          void AccountMgr::InitializeAccountMgr(): AccountMgr initialized
14:52:00.5505          void AccountMgr::ReloadAllAccountsFromPreferences(): Reload all accounts
14:52:00.5505          void AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Twitter
14:52:00.5505          void AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for YouTube
14:52:00.5506          void AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Streamlabs
14:52:00.5506          void AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Twitch
14:52:00.5506          void AccountMgr::RecreateServiceInstancesForType(): Recreate service instances for Facebook
14:52:00.6141          MainWindow::MainWindow(): Running in high dpi mode: 2.00
14:52:00.7700          void ESDAppController::bootstrap(): All object init done!
14:52:00.7756          ESDSharedFileServer::ESDSharedFileServer(): mapfile location /Users/paularmstrong/Library/Application Support/com.elgato.streamdeck/STREAMDECKINTERNALSHM
14:52:00.8625          virtual bool MainWindow::event(): Wake up keypad(s).
14:52:00.8851          auto ESDObsConnectionManager::CreateSocket(): SLOBS returned error Connection refused
14:52:01.0385          void ESDAppController::onDeviceStatusChanged(): Device connected, id: @(1)[4057/99/BL38J1B05584], serial number: BL38J1B05584, firmware version: 3.00.001
14:52:01.0417          void ESDPreferenceTabGeneral::DeviceStateChangedNotification(): Dev FW ver: 3.0.1.0, Embed FW ver: 1.3.0.0
14:52:01.0417          void ESDPreferenceTabGeneral::DeviceStateChangedNotification(): show update fw button: no
14:52:01.0417          void ESDPreferenceTabGeneral::DeviceStateChangedNotification(): Serial No: BL38J1B05584
14:52:01.0769          void ESDCustomPluginCommunication::onMessageReceived(): Plugin B59C442F007AFC37A1D9B72CB69E66BE is now connected
14:52:01.1568          void ESDCustomPluginCommunication::onMessageReceived(): Plugin 8AE90D08E16D2E744531D7F753F7456E is now connected

Raise Hand not working

Hello! I recently installed the plugin and it works perfectly except for the "Raise Hand" shortcut not working.

MacOS: Ventura 13.14.1(c)
Stream deck Soft: 6.3.0 (18948)
Chrome: 115.0.5790.114 (Official Build) (arm64)

Browser extension requires English Google account language

The browser extension (and thus the whole plugin) currently only works for users who have their Google account's language set to English. This is an unfortunate consequence of how the extension locates controls on the Meet web page. Google obfuscates Meet's JavaScript and CSS, so to identify and interact with UI controls such as the mute buttons, the extension searches for human-readable labels like "microphone" and "leave call". However, these labels change depending on the account's language setting.

Note that it's the Google account language that matters, not the user's browser settings. You can change your account's language on https://myaccount.google.com/language. Users may also have multiple Google accounts set to different languages (as in #6).

Possible solutions here include:

  • Trying to find another strategy to interact with Meet's controls.
  • Adding keywords in other languages to the extension.

WebSocket connection to 'ws://127.0.0.1:2394/' failed

Hello,

I'm having trouble with establishing a WebSocket connection while using the Stream Deck plugin for Google Meet. The error message I am receiving is as follows:

stream_deck_connection_manager.js:58 WebSocket connection to 'ws://127.0.0.1:2394/' failed:

I've checked to make sure the WebSocket server is running on localhost at port 2394. Here's what I get when I use the lsof command:

❯ lsof -i :2394
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
main 2293 sdk 8u IPv4 0xba7d0a72edc0a88b 0t0 TCP localhost:ms-olap2 (LISTEN)

I've also successfully connected to localhost at port 2394 using telnet:

telnet 127.0.0.1 2394

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

his suggests that the WebSocket server is indeed running and that the port is accessible. However, the connection still fails when it's established by the Stream Deck plugin. I've checked for potential firewall issues, but I didn't find anything that would block this connection.

Any help or suggestions would be greatly appreciated. Thank you.

Make it so disconnected icon can be turned off

When I'm not in a meeting, the icons for the mic and camera have the red disconnected icons on top of them. This doesn't look great and I'd love something that is either more subtle (maybe have them greyed out) or the ability in the Stream Deck app to configure if the red icon shows or not.

Focus Google Meet tab

As someone who might have a lot of tabs open during a google meet meeting, I'd love to be able to press a button to instantly focus/open the tab that has my meeting on it, so that I don't need to fumble around when someone is trying to show me something.

Support for raising hand

Google recently added support for virtually raising one's hand in a Meet call. It would be great if I could map that functionality to the Stream Deck

Enhancment: switch microphone, speaker and video device

Overview:

  • required a button for switching between the external microphone and headphones
  • required a button for switching the input camera device, especially when in use virtual camera
    optional: switch the speaker device

Publish extension to chrome webstore

That would significantly reduce the effort in consuming this. I've done some work with publishing extensions before and can help with automating that.

Enable Push to Talk

Google Meet now supports a Push-To-Talk mode where hitting space can unmute you.

Pin Presentation button issues with new Meet UI

This is a terrific plugin and I really appreciate the quick updates to support the new Google Meet UI! On the latest version of the extension, things are working well, but I've noticed a small issue with the Pin Presentation button.

When in a larger meeting with someone presenting, if there are more people in the meeting than there is space for video tiles (such that you see a tile with "X others"), the Pin Presentation button toggles between the presentation and an arbitrary video tile, instead of between the presentation and the full grid view. Sometimes (but not always) pressing the Pin Presentation button multiple times will alternate between the presentation, a video tile, and the grid view. Other times you never get to the grid view.

If you make the window large enough that all tiles plus the pinned presentation can fit in the window, then the Pin Presentation button works consistently well, toggling between the presentation and the grid view. My Meet settings are: Tiled layout with slider at max, self tile on. Please let me know if any other info would be helpful!

"Toggle Hand" doesn't work

Hi

When i'm trying to toggle the hand, from my stream deck, it won't toggle.
The mic and cam toggle perfectly

-FigoFlash123 😊

New action: End Call for Everyone press

Right now, when I press the 'Leave Call' button, the modal to 'End call for everyone' pops up. I'd like a way to press that without having to return to the tab.

Upcoming Google Meet redesign will likely break functionality

Google has announced that they will soon be launching a large redesign of the Meet web UI.

Details:
https://blog.google/products/meet/design-updates-video-backgrounds/
https://support.google.com/meet/answer/10550593

There's a high probability that this redesign will break some or all of the functionality of our browser extension.

I haven't found a way to opt in to the redesign early to test it. If anyone discovers a way to do so, please share. Otherwise, this plugin will likely remain broken for a bit until we're able to update it post-launch.

Meetings started with Mute On do now show correctly on Streamdeck

By default, Google Meet mutes all attendees when they join if there are 5 or more participants. In this scenario, the participant is muted, but the StreamDeck is not updated and it shows it as Unmuted even though the actual meeting is muted, resulting in out-of-sync.

How move or unistall to reinstall?

I added to the desktop and this means the plugin file is on there permanently. Then the mic toggle stopped working and said "disconnected"

I wanted to just move but it is in operation so won't let me. Similarly, I cannot uninstall to be able to reinstall in a subfolder?

I tried to uninstall in the streamdeck decktop app but there is no apparent "uninstall" button or option.

Any ideas?

Create release from latest source code

Hi there,
I've downloaded source code on releases, and I was able to install StreamDeck plugin and also Google Chrome extension, but extension had some warnings regarding manifest V3.
I've fixed those locally and I was good to go.

When I check the actual latest code, those changes are already there, but not in the releases tab.

Can we automate the releases or at least, manually create one, so it includes the latest changes?

Thanks!

Disconnected

Sorry if this is a dumb question, but i cannot control anything, the title on the Stream deck button
says Disconnected. How can I fix this? I installed the extension, reloaded the page, removed and added the extension
and the key but nothing worked.

Error: Could not read

Archive
~\Desktop\streamdeck-googlemeet-1.2.1\com.chrisregado.googlemeet.sdPlugin
Error
Missing 'manifest_version' key. Its value must be an integer either 2 or 3. See developer.chrome.com/extensions/manifestVersion for details.
Could not read manifest

On trying to load

FireFox support

Is there a way to use it with firefox? other that that it works very well

Open Meet: Select which account to open

I'm logged in on Google services with two accounts:

  1. Personal
  2. Professional

...and I use Google Meet for professional purposes but I like to keep my personal as the default account.

When using Open Meet button, it opens my default account and requires me to switch manually to the professional one.

It would be very useful to be able to choose which account to open.

Only open Meet is working

Really looking forward to getting this working. I got the stream deck just to be able to control Meet.
I followed the instructions, only Open Meet button is working.
Mic and Camera Toggle showing disconnected

Streamdeck Mini
Software Version 5.0.0 (14247)
firmware 3.00.001
Chrome: Version 94.0.4606.54 (Official Build) (x86_64)
MacOS: 11.6

Option to directly start a meeting with a given account

First of all, well done, nice extension/plugin !

Currently the "Open Meet" action has no option. I would ne nice to go a step further and be able to directly create a meeting "now" from a given account (that may need to be provided as index...)

Additional Screen Features

I was browsing another project for Google Meet integration and saw they implemented the following features. Would be great to have the same here:

  • In lobby
    • In the lobby, 2 buttons are enabled:
      • Start next scheduled meeting.
      • Start instant meeting.
  • In green room
    • In the green room, there are three buttons enabled:
      • Enter meeting (Join now).
      • Mute/unmute mic.
      • Enable/disable cam.
  • In the meeting
    • While in the meeting, there are sevent buttons enabled:
      • Raise/lower hand (when available).
      • Enable/disable captions (when available).
  • After meeting
    • Rejoin meeting.
    • Return to home screen.

The implementation I'm referencing is here: https://github.com/petele/StreamDeck-Meet

All Actions "Disconnected" - Windows 11

Love this plugin, used it on my Mac all the time. I moved over to a new PC recently, so immediately redownloaded this. The plugin installed fine, so did the extension. However, none of the assigned keys seemed to be working. On the Toggle Mic and Camera there was even an error symbol over the top. When I take a look on the app, all of them are titled as "disconnected". The only one that seems to be working is the Google Meet Launch command. I've tried uninstalling, reinstalling, restarting the computer, but I still can't figure out why things aren't working on this machine. Anyone else having this issue? Any help is appreciated.

Stream Deck Mk1
Version: 6.2.1.18825
Chrome Version: Version 114.0.5735.90
Operating system: Windows 11

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.