Skip to content

Instantly share code, notes, and snippets.

@shoaibali
Forked from caseywatts/0 push to talk.md
Created March 15, 2018 22:03
Show Gist options
  • Save shoaibali/bc1bb40c61d6437099278eb240786185 to your computer and use it in GitHub Desktop.
Save shoaibali/bc1bb40c61d6437099278eb240786185 to your computer and use it in GitHub Desktop.
Push To Talk - Google Meet Bookmarklet

Short link to this page: http://caseywatts.com/ptt

Other gists & tricks: http://caseywatts.com/gists-and-tricks

Push To Talk in a Google Hangout (Meet)

  1. Save this bookmarklet. Right-click on boomarks toolbar Add Page...
    • Name: PTT (push to talk) or whatever you'd like (maybe short so it stays on your bookmarks toolbar)
    • URL: (paste in the bookmarklet.js contents below)
  2. In a Meet, click on the bookmarklet
  3. Press and hold spacebar to talk. Keydown will un-mute you, and keyup will re-mute you.
  4. 🎉
javascript:(function(){
document.body.onkeyup = function(e){
if(e.keyCode == 32){
document.querySelector('[data-tooltip="Turn off microphone"]').click(); // Meet
// document.querySelector('[data-tooltip="Mute microphone"]').click(); // Hangouts, but it doesn't work
}
};
document.body.onkeydown = function(e){
if(e.keyCode == 32){
document.querySelector('[data-tooltip="Turn on microphone"]').click(); // Meet
// document.querySelector('[data-tooltip="Unmute microphone"]').click(); // Hangouts, but it doesn't work
}
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment