Skip to content

The world can be ending, but you still need to mute that mic or lock that computer. Works with Google Meets or mutes the mic system wide

Notifications You must be signed in to change notification settings

alicescfernandes/big-red-mute-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔴 Big Red Mute Button

Mute that mic with Javascript or lock that computer with custom hardware!

[insert image here]

With the release of Chrome 80, a new web API was shipped with the browser. This API allows the browser to communicate via serial with other devices, however is behind a flag. This project makes use of that API to communicate with an Arduino Micro that opens a serial port over USB. Both are set to the 6900 baud rate, so that they can communicate with each other.

This makes use Tampermonkey to inject a script that will allow you to connect to any device over serial, and when a connection is established, the javascript will hijack the mute button (of the DOM) and will read the status of the button, and will send a first command to the connected device. Then, with the MutationObserver API, whenever the button is clicked, it will read again the status of the button, and send over the command to the arduino.

The arduino accepts (over serial) two string values: a '0' and a '1',when is 0 the light is turned off, and when is '1' the light is turned on. It's the browser that tells if the LED is on or off. When you press the "physical" button, the arduino will detect the press and send it over to the browser (by writing a '0' on the console), and the browser will check the current status of the mute, and toggle it.

Setup - Tampermonkey

Mute the mic globally (only compatible with OSX & Windows) (WIP)

With the help of some python code we can make the mic mute globally, aplication-wide. To do so, just follow the instructions below.

I'm still working on a GUI to make this a little bit easier to do, and is still a little big hardcoded

Setup - Python (only compatible with OSX)

  • cd python/
  • pip3 install -r requirements.txt
  • Press the button and you should be muted.

Attention Mac Users!

If your system is High Sierra or below you may need to install the CH34X drivers on your mac. This page explain how you can install the driver

For M1 chips

https://arduino.stackexchange.com/a/86787

Parts

  • A Relay A IRFZ44N Transistor (i had a relay on the first draft, but it makes a clicking noise when switching, so i've replaced it with a IRFZ44N transistor)
  • Arduino (i'm using a chinese version of nano)
  • Big Dome Pushbutton
  • two 10k Ohm resistor
  • A 12V battery pack or
  • A 9V Battery and a 9V-12v step-up boost converter (i'm using this one)

Some parts i've used here are somewhat expensive, so do replace them with cheaper ones. Just keep in mind that the arduino should have serial ports and also HID capabilities.

TODO:

  • Moving JS code into an extension
  • GUI for python

References

About

The world can be ending, but you still need to mute that mic or lock that computer. Works with Google Meets or mutes the mic system wide

Topics

Resources

Stars

Watchers

Forks