-
Hi, v. 6.5.1 (19929) I am upgrading existing plugin written in plain JS and need to update my global setting to the new structure. My idea was to do it in didReceiveGlobalSettings, update data and save settings again. All PI will get the right object at registration. `if (event === 'didReceiveGlobalSettings') {
}` However, I am not receiving didReceiveGlobalSettings after saving it. I have even tried to use timeout to delay saving. I can save global settings from PI, but not from plugin. Are there any limitations or better way to do it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @Muhomorik, Are you using the template repository (with an HTML file) or the new Node.js beta? Using the new Node.js beta, you can set global settings from the plugins like this: import streamDeck from "@elgato/streamdeck";
streamDeck.settings.setGlobalSettings({ myCoolSetting: "Hello World"}); if you are still using the old javascript library running in the Qt webengine, you should be able to set global settings like this: $SD.setGlobalSettings({ myCoolSetting: "Hello World"}); |
Beta Was this translation helpful? Give feedback.
-
Hi,
And the output I am getting in console is |
Beta Was this translation helpful? Give feedback.
It looks like you using
setGlobalSettings
in yourdidReceiveSettings
callback, but that callback is only triggered whengetGlobalSettings
is called. You'll want to set your settings before you callgetGlobalSettings
in order to see them in the event.