You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is my attempt to route obspython to browser docks:
# install remi with this commad: "python3 -m pip install remi"importobspythonasobsimportthreadingimportremi.guiasguifromremiimportstart, AppclassMyApp(App):
def__init__(self, *args):
super(MyApp, self).__init__(*args)
defmain(self):
container=gui.VBox(width=120, height=100)
self.lbl=gui.Label("Hello world!")
self.bt=gui.Button("Press me!")
# setting the listener for the onclick event of the buttonself.bt.onclick.do(self.on_button_pressed)
# appending a widget to another, the first argument is a string keycontainer.append(self.lbl)
container.append(self.bt)
# returning the root widgetreturncontainer# listener functiondefon_button_pressed(self, widget):
self.lbl.set_text("Button pressed!")
self.bt.set_text("Hi!")
defon_load(event):
ifevent==obs.OBS_FRONTEND_EVENT_FINISHED_LOADING:
t=threading.Thread(target=event_loop)
t.start()
# starts the web serverdefscript_load(settings):
obs.obs_frontend_add_event_callback(on_load)
defevent_loop():
start(
MyApp,
address="127.0.0.1",
port=8081,
multiple_instance=False,
enable_file_cache=True,
update_interval=0.1,
start_browser=False,
)
To add browser dock go to View -> Docks - Custom Browser Docks... - type name , then 127.0.0.1:8081
This is not yet work on GNU/Linux, because there is not browser docks. However you can test your GUI right now just preload libpython3.<x>, just like this and start OBS Studio via obs or obs-studio:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Here is my attempt to route
obspython
to browser docks:To add browser dock go to
View
->Docks
-Custom Browser Docks...
- type name , then127.0.0.1:8081
This is not yet work on GNU/Linux, because there is not browser docks. However you can test your GUI right now just preload
libpython3.<x>
, just like this and start OBS Studio viaobs
orobs-studio
:See also:
Add Script Data Bindings to obs-browser
remi
- reverse websockets server(local) GUI for OBS Studio.Beta Was this translation helpful? Give feedback.
All reactions