Open paul-lrr opened 7 years ago
There currently isn't a way.
Just a critique, the method is .getCurrentScene()
Just a critique, the method is .getCurrentScene()
Oops! Subconscious wishful thinking on my part, I guess 😄
On a related note, it would be useful to have something like getSourceScene()
so that a source could know what scene(s) it has been added to. Combined with getCurrentScene()
it would allow a source to do something when its scene becomes active.
A source can already do something when it's scene becomes active. There's already an event for scene changes.
There is the event for scene changes, but is there a way to tell if the scene it changed to is the one that the source is on?
That would only be useful if the source doesn't have "shutdown when not visible" checked though?
That would only be useful if the source doesn't have "shutdown when not visible" checked though?
Actually, letting a source know if it is or is not on the current scene is useful if you want a source that is still running when not on the scene, but not to output audio.
Example, part of our on-screen chat widget is a popup when a user mentions us on twitter and displays a thank you, and makes a noise as well.
rather than unloading the whole widget, and reloading it when i go back to the scene, i used to use (in OBS Classic), OBS Remote to determine if the widget was still in the current scene, and if it wasn't, it would mute all audio alerts so we could have "quiet" scenes
I was just wondering if there has been any more thought about this feature. A browser source being able to know its own obs name and what scene(s) it appears on would be very useful. Aside from the use case above (allowing a source to do something when it is being displayed on the current scene), I was recently thinking that a browser source could use obs-websocket to do advanced manipulation of itself (eg. scale, crop, rotate, apply filters, etc) but ran into the issue that a browser source doesn't actually know any obs-specific information about itself. If it knew its obs name or item id, I could use that info to target the source with obs-websocket, but as it is, I can't see a way for a given browser source to find itself in the list of obs sources.
The
getCurrentSource()
method gives info on the current OBS scene, but is there any way to get the name in OBS of the BrowserSource itself? Not the