Widget
Widget is a global object that already exists when your script.js runs. Its types live in
widget.d.ts, the same ones the code editor uses for autocomplete.
Widget.on: listen to a Twitch, Kick, YouTube or TikTok event with the same fields on all of them.Widget.streamerbot: raw events, Streamer.bot actions and chat messages.Widget.parameters: read the menu parameters.Widget.t,Widget.langandWidget.design: texts per language and the chosen design.Widget.status: the state of the connection with Streamer.bot.Widget.queue: a queue so alerts do not overlap.Widget.dom: draw text, messages and images safely.Widget.assets: your images, videos and sounds.WidgetAlertsandAlertRuntime: the interpreter of the no-code alerts and the visual editor engine, with their hooks.Widget.manifest: the already parsedmanifest.json, read-only, with the standard menu sections.
The connection
Section titled “The connection”You do not have to connect anything. widget.js reads the data in the URL (streamerbotHost, the port and
the password, and tiktokPort for TikFinity) and opens the connection only when needed; if it drops, it
retries. In “Configure” you choose whether Streamer.bot is on this PC or on another one.
The size in OBS
Section titled “The size in OBS”Widget.manifest.size is the size of the browser source in OBS ({ "width": 800, "height": 600 } in new
widgets) and Widget.manifest.scene is the scene it goes in (1920 × 1080). A widget without them was made
for 1920 × 1080.