Your first widget
A Studio widget is a small web page that OBS loads as a browser source. You listen to events from your
platforms with the SDK (Widget), draw them with HTML and CSS, and the Studio validates it, keeps it in
versions and gives you the URL for OBS.
The four files
Section titled “The four files”- index.html what goes inside
<body> - style.css the styles
- script.js your code, with
Widgetalready available - manifest.json the events, the texts and the parameter menu
index.htmlonly holds the content of<body>. The Studio wraps it in a full page: it linksstyle.css, loadswidget.js(the SDK) and then yourscript.js.style.cssis plain CSS. The widget background must betransparentso OBS blends it with the scene.script.jsis your code. Nothing to import:Widgetexists from the start and connects by itself to your Streamer.bot (or to TikFinity, for TikTok) using the data in the URL.manifest.jsondeclares what the widget uses: the events it listens to, the Streamer.bot actions, the texts in each language, your own files and the parameter menu. EverythingWidgetreads comes from here; the SDK only delivers the events you declare inevents.
From the editor to OBS
Section titled “From the editor to OBS”- Test. The editor preview is connected to a Streamer.bot simulator: you fire an event from “Test” and your widget receives it as if it came from your channel. With “Test in OBS” you paste a temporary URL in OBS and the same event shows up there, with no Streamer.bot needed.
- Save version. It validates the draft. Errors block publishing; warnings do not. The last 40 versions are kept and you can restore any of them to the draft.
- Publish. You choose which version your OBS URL serves (for now, privately: only you, with your URL).
- Configure. Your URL lives here, along with the parameters saved with it and what the widget needs from Streamer.bot. Changing a parameter does not create a version.
- OBS. In Sources → + → Browser you paste the URL. A new widget is 800 × 600, which is what OBS
proposes by default, so you just accept. In Streamer.bot, turn on its WebSocket server (by default,
127.0.0.1:8080).
Next steps
Section titled “Next steps”- See the templates you can start from.
- Read the
Widgetreference and the one for each event.