Closed jaotors closed 1 year ago
Hi! Do you mean within javascript or within the plugin's source? There is an event that is triggered during OBS scene change which calls obs_frontend_get_current_scene. From a purely technical side of view there is a "obs_frontend_get_scenes" which returns all scenes in the UI in the OBS Studio sources (UI/api-interface.cpp). If you need access to that via javascript you would need to implement a call to expose this function to the V8 javascript interpretor. You could do that via either a function defined in the javascript and then update it via DispatchJSEvent in obs-browser, or you can statically read it once when you load the plugin and then have it accessable via javascript (see obs-browser-source.cpp and obs-browser-plugin.cpp).
All the best, Chris
obsstudio.getScenes() would return you the list of scenes, even if the source is not active.
However if the source is not loaded, or has unloaded due to the Shutdown when source not visible
, there is no way around that.
Hello, can i get the name of the scene/s even though it is not active?