Add get/set source visibility functions#495
Add get/set source visibility functions#495fauxnik wants to merge 1 commit intoobsproject:masterfrom
Conversation
This exposes a javascript function for determining the visiblity of arbitrary OBS sources and another for modifying said visibility. These functions are available to browser sources with the requisite permissions: ReadUser or higher for get, Advanced or higher for set.
|
We have previously rejected additions to the JS API as it's not really something we feel is sustainable long-term for the project. Is there a reason that you cannot use the websockets API for this? |
Heyo, There are very good reasons for implementing this: Can I use WebSockets? Additionally, WebSockets have full OBS control. Users don’t want that. As a developer, I also want the least privileges possible and don’t want the ability to mess with the config. Additionally for a user who doesn’t know what a WebSocket is, they might not want to activate it or bother setting it up. For me this feature would be huge. (I need some more functions like getting transformation information of a source. I could submit PRs if there is a chance that they will be added) |
And where do we draw the line every time someone wants more features available for their specific use case? |

Description
This exposes a javascript function for determining the visiblity of arbitrary OBS sources and another for modifying said visibility. These functions are available to browser sources with the requisite permissions: ReadUser or higher for
getSourceVisible, Advanced or higher forsetSourceVisible.Motivation and Context
Excerpt from #73 (comment):
How Has This Been Tested?
I'm still working on figuring out how to build obs-browser, so the change hasn't been tested yet. I'd appreciate any tips you have regarding this as it appears the obs-studio build process has changed since the last time the obs-browser build documentation was updated.
Types of changes
Checklist: