Replies: 1 comment
-
// SetCurrentScene returns an empty object on resolve, so while you can use the callback to know when scene has been set, Get works as a better example:
obs.send("GetCurrentScene").then((data) => {
console.log(data.name); // Current scene name
}); Alternatively there's also async/await syntax: // Generally should be in a async function like
// async function checkCurrentScene() {
const data = await obs.send("GetCurrentScene");
console.log(data.name); // Current scene name |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been successfully controlling OBS using obs-websocket-js and it works fantastically well. However, I have no idea how to retrieve values from OBS using code. I've looked everywhere and there are no examples of syntax. Functions like GetTextGDIPlusProperties are there, but how do I use them?
This is how I'm currently using the obs-websocket-js to send commands...
Any help would be most appreciated!
Beta Was this translation helpful? Give feedback.
All reactions