I expected SetSceneItemEnabled to receive "sourceName" (or "sceneItemName") but we need to use sceneItemId: 11 which is a "random" number that is not human friendly and theres no way to know it.
which works perfectly well but sceneItemId is unknown to us "users".... are we supposed to guess it?
I had to use obs.on("SceneItemSelected", (data) => callback(data)); to find out it was 11 and then figured out theres code to get that ID programatically... one could do:
but this makes the code way bigger compared with the original... also a bit repetitive... because first we find an ID then we set that ID enabled to true
what about supporting something like sceneItemName that way we could address a given item by a human readable name instead of a "random" ID. Something like:
I'm not even sure where that ID comes from and I'm guessing it might even change over time... (if the user removes/adds items)
P.S. Not sure if this is a problem with the JS version or with the protocol it self....? Should I open an issue on OBS GitHub?
Hi!
I expected
SetSceneItemEnabled
to receive "sourceName
" (or "sceneItemName
") but we need to usesceneItemId: 11
which is a "random" number that is not human friendly and theres no way to know it.previously we used:
this was self explanatory, on the scene
browsers
set the itemwarning
as visible. now with OBS 28 and obs-websocket-js 5:which works perfectly well but
sceneItemId
is unknown to us "users".... are we supposed to guess it? I had to useobs.on("SceneItemSelected", (data) => callback(data));
to find out it was11
and then figured out theres code to get that ID programatically... one could do:but this makes the code way bigger compared with the original... also a bit repetitive... because first we find an ID then we set that ID
enabled
totrue
what about supporting something like
sceneItemName
that way we could address a given item by a human readable name instead of a "random" ID. Something like:I'm not even sure where that ID comes from and I'm guessing it might even change over time... (if the user removes/adds items) P.S. Not sure if this is a problem with the JS version or with the protocol it self....? Should I open an issue on OBS GitHub?
Versions Used (if applicable):