Getting the OBS name of the source #74

Open
opened 2017-04-16 01:23:24 -05:00 by paul-lrr · 8 comments
paul-lrr commented 2017-04-16 01:23:24 -05:00 (Migrated from github.com)

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

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 <title> or the url of the html file but the name it has been given in the Sources listing.
SReject commented 2017-04-16 10:48:49 -05:00 (Migrated from github.com)

There currently isn't a way.
Just a critique, the method is .getCurrentScene()

There currently isn't a way. Just a critique, the method is `.getCurrentScene()`
paul-lrr commented 2017-04-16 13:00:17 -05:00 (Migrated from github.com)

Just a critique, the method is .getCurrentScene()

Oops! Subconscious wishful thinking on my part, I guess 😄

> Just a critique, the method is .getCurrentScene() Oops! Subconscious wishful thinking on my part, I guess 😄
paul-lrr commented 2017-04-22 12:47:51 -05:00 (Migrated from github.com)

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.

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.
OsirisNL commented 2017-04-22 13:12:39 -05:00 (Migrated from github.com)

A source can already do something when it's scene becomes active. There's already an event for scene changes.

A source can already do something when it's scene becomes active. There's already an event for scene changes.
paul-lrr commented 2017-04-22 13:37:12 -05:00 (Migrated from github.com)

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?

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?
OsirisNL commented 2017-05-14 11:25:50 -05:00 (Migrated from github.com)

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?
macharborguy commented 2017-05-20 22:22:12 -05:00 (Migrated from github.com)

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

> 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
paul-lrr commented 2021-03-07 19:30:53 -06:00 (Migrated from github.com)

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.

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.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/obs-browser#74
No description provided.