Getting the OBS name of the source #74
Labels
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser#74
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 theThere currently isn't a way.
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 withgetCurrentScene()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?
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.