Repository navigation
darkbot v0.6.0
What's new
Now Playing overlay for OBS: six designs and their own tab
The song that Spotify or YouTube Music is playing can now be shown in the
stream. The new "Now Playing" tab shows:
- what is playing, on which service
- the switches: show in OBS, cover, progress bar, who requested it, hide
while paused - all six designs as live previews with the current song (a sample song
when nothing plays). One click picks a design.
The designs are Console, Glass, Lower third, Vinyl, Minimal and Compact.
They live in one page, frontend/dist/overlay/nowplaying.html. OBS shows
that same page, so a preview looks exactly like the stream.
OBS: darkbot adds a browser source, "[darkbot] now playing", to its scene
in the bottom-left corner. The source shows the page, which darkbot
writes into its settings folder with the font next to it. darkbot sends
the song over the existing OBS connection with obs-browser's emit_event
vendor request (checked against the obs-browser README and source), so
darkbot still opens no port. The page is rewritten, and reloaded in OBS,
only when an update changed it. The source is set up again after OBS
reconnects and removed along with darkbot's other OBS parts. An OBS
without browser sources gets a clear message.
Data: Spotify's Get Currently Playing Track (darkbot already has the
scope; ads are skipped) and Pear Desktop's /api/v1/song. darkbot asks
every 3 s, and only while the overlay is on or the tab is open; the page
moves the progress bar on by itself in between. A playing service wins
over a paused one. "Requested by" comes from !sr.
Security:
- song titles and artists go into the page only as textContent; tested
with HTML in a title - cover URLs must be http(s)
- the preview's cover is downloaded by darkbot (https only, max 2 MB) and
served from memory, so darkbot's window still loads nothing from the
internet
Not yet tried in a real OBS: the page was tested with the same
CustomEvent that obs-browser dispatches.
Test: wait for idle before the simulated OBS crash
TestOBSKeepAlive simulated an OBS crash right after reconnecting, while darkbot's after-connect requests (scene check, hiding old alerts) were still queued. goobs sends one request at a time, and each queued request to a dead OBS fails only after its 5 s response timeout. On a slow CI runner the drop therefore came after the test's limit: it failed on CI and once locally. The test now waits until darkbot has sent no request for a moment, as it already did after the first connect. A crash while idle is noticed at once, so the test takes about 2 s instead of 11 s. The fake OBS gained Total() for this.
Download
- Windows 10/11:
darkbot-windows-amd64.exe - macOS, Apple Silicon:
darkbot-macos-arm64.app.zip - macOS, Intel:
darkbot-macos-amd64.app.zip - Linux:
darkbot-linux-amd64
Already installed? darkbot updates itself on the next start.
Full changelog: v0.5.0...v0.6.0