Replies: 2 comments
-
To the best of my knowledge, that is how it works. The image of the button (action) will be updated in the next willAppear of the action. |
Beta Was this translation helpful? Give feedback.
-
Stream Deck caches the image until you tell it to draw a new image like so: const foundAction = streamDeck.actions.find(action => action.id == "<myActionId>");
foundAction.setImage(<myimage>); If you change the file in the meantime, you have to trigger the update in your code... see here: https://docs.elgato.com/streamdeck/sdk/guides/keys/#setimage Usually you do that from inside an key-event: override async onKeyDown(ev: KeyDownEvent<ActionSettings>): Promise<void> {
ev.action.setImage('data:image/svg+xml,<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" width="72" height="72"><rect x="0" y="0" width="72" height="72" fill="red"/></svg>');
} |
Beta Was this translation helpful? Give feedback.
-
I was led to believe (chatgpt) if I assign a button image to a file (jpg) that if I changed the image in that file it would automatically change on the stream deck. This does not work. Am I doing something wrong or has chatgpt given me bad info? If it has, is there an easy way to make a dynamic button image work?
Beta Was this translation helpful? Give feedback.
All reactions