Last active
December 3, 2021 16:40
-
-
Save rothgar/92e69d5bdcf80ea23f065bb6db03f7cd to your computer and use it in GitHub Desktop.
Streamyard Keyboard Shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Streamyard Keyboard Shortcuts | |
// @namespace http://streamyard.com | |
// @version 0.1 | |
// @description Simple keyboard shortcuts for streamyard | |
// @author [email protected] | |
// @match https://streamyard.com/* | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.addEventListener('keydown', function(e) { | |
//console.log(e); | |
if (e.key == "m" && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { | |
var unmuteButton = document.querySelector('[aria-label="Unmute microphone"]'); | |
var muteButton = document.querySelector('[aria-label="Mute microphone"]'); | |
if (unmuteButton !== null) { | |
unmuteButton.click(); | |
} else { | |
muteButton.click(); | |
} | |
} else if (e.key == "v" && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { | |
var faceUnmuteButton = document.querySelector('[aria-label="turn on camera"]'); | |
var faceMuteButton = document.querySelector('[aria-label="turn off camera"]'); | |
if (faceUnmuteButton !== null) { | |
faceUnmuteButton.click(); | |
} else { | |
faceMuteButton.click(); | |
} | |
} | |
}, false); | |
})(); |
Could scripts like these be used with Tampermonkey to execute cusotm multi-action macros in Streamyard?
For example, I would love to be able to program a key on the Elgato Stream Deck to put a png or GIF overlay onto the stream for a specified amount of time and then take it down, for example Like or Subscribe images or animations for 3-5 seconds.
If yes, and someone would be interested in putting some code together (for remuneration) please reach out [yisroel @ rabbiglick.com].
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to use a Stream Deck with this no problem, simply simulate the keyboard presses in the software and have Streamyard open with this script and it works. I was also able to modify this to simulate a few other shots like the various layouts since they all had unique aria text. Thanks @rothgar!