obsproject / obs-websocket

Remote-control of OBS Studio through WebSocket
GNU General Public License v2.0
3.79k stars 701 forks source link

Bug: SetSourceItemEnabled doesnt work on Browser Sources #1223

Closed Thisguyneedshelp closed 1 month ago

Thisguyneedshelp commented 1 month ago

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

29.0.x

OBS Studio Version (Other)

30.0.2

obs-websocket Version

5.1.0

OBS Studio Log URL

https://obsproject.com/logs/wJaRbfZBRTPO8f4D

OBS Studio Crash Log URL

No response

Expected Behavior

I have this python code that ill paste below, the filter for ttts, and the chatter1 source both work, meaning i didnt use the commands incorrectly, and while im 100% sure the names are correct, the filter and visibility for the chatterchat1 does not work, i can only assume that its because it is a browser source since thats the only difference i can think of ''' if user_number == "1": self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 1", True) self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter1", True) self.obswebsockets_manager.set_filter_visibility("chatterchat1", "chatoff", False)
self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat1", True)
elif user_number == "2": self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 2", True) self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter2", True) self.obswebsockets_manager.set_filter_visibility("chatterchat2", "chatoff", False) self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat2", True)
elif user_number == "3": self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 3", True) self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter3", True) self.obswebsockets_manager.set_filter_visibility("chatterchat3", "chatoff", False) self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat3", True) self.audio_manager.play_audio(tts_file, True, True, True)

    if user_number == "1":
        self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 1", False)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter1", False)
        self.obswebsockets_manager.set_filter_visibility("chatterchat1", "chatoff", True)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat1", False)            
    elif user_number == "2":
        self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 2", False)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter2", False)
        self.obswebsockets_manager.set_filter_visibility("chatterchat2", "chatoff", True)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat2", False)            
    elif user_number == "3":
        self.obswebsockets_manager.set_filter_visibility("tts", "Audio Move chatter 3", False)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatter3", False)
        self.obswebsockets_manager.set_filter_visibility("chatterchat3", "chatoff", True)
        self.obswebsockets_manager.set_source_visibility("Gameplay", "chatterchat3", False)

'''

Current Behavior

it does not do the thing i want it to

Steps to Reproduce

  1. use SetSourceItemEnabled on a browser source
  2. i havnt actually tested just that line, but i have tried using the direct request rather than the variable defined version that im using
  3. ...

Anything else we should know?

No response

tt2468 commented 1 month ago

This sounds like user error to me. I do not see how there could be a bug in this situation, given that nobody else has reported such an issue and there is theoretically no difference between a browser source and any other source in the code path here.

If you firmly believe this is a bug, please post a log with obs-websocket debug logging enabled, and we can see what messages are actually being passed back and forth.

Thisguyneedshelp commented 1 month ago

if it is a user error then im not sure what im doing wrong, i know the scene and source names are correct cause im copy and pasting them in, and it works for the other ones, so its not like i messed up the code itself, so i just dont know what else it could be... i just went to test the code again for the debug log, and it works now, even tho i had tried restarting the code like 10 times over, i changed literally nothing, but it works now so, its fixed, i guess, coding sucks