Last active
July 26, 2021 19:30
-
-
Save krabs-github/a8b6200d73d65fabb47ba52207c85f0b to your computer and use it in GitHub Desktop.
[Set Image Function Sample] setImage function sample #Public #Streamdeck
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
// Variables beginning with "v" are the variables you define prior to calling the function. | |
// The Function | |
function setImage (context, vBase64img) { | |
var json = { | |
'event': 'setImage', | |
'context': context, | |
'payload': { | |
'image': vBase64img, | |
'target': DestinationEnum.HARDWARE_AND_SOFTWARE | |
} | |
}; | |
//console.log("setImage: ", vBase64img) | |
websocket.send(JSON.stringify(json)); | |
} | |
// The image we want to send to the streamdeck key | |
vBase64img = "resources/myimage.png"; | |
// Call the function | |
setImage(context, vBase64img); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment