All work

Production tech

Running a church live stream from a Stream Deck

A Bitfocus Companion module in TypeScript that shows Resi streaming encoder status on Stream Deck buttons and starts or stops the stream, using Resi's web API.

Goodlettsville Pentecostal Church · Production · 2024 – 2026

The problem

The church streams every service through Resi. Starting and checking the stream meant opening Resi’s website on a separate screen, while everything else in the booth runs from Stream Decks through Bitfocus Companion.

What I built

Resi doesn’t publish this API. It’s the one their own web app uses, so the module’s README warns it can change without notice.

  1. Sign intoken for the session
  2. Who am Icustomer ID
  3. Pollencoder status
  4. Buttonlive, idle or error
  5. Actionstart or stop

The status loop

A sketch of the idea, not the production code.

fn ensure_token():
    if token == null or token.expires_at < now():
        token = post("/api/v3/auth/token", credentials)        # sent as X-Bearer, not Bearer
        customer = get("/api_v2.svc/users/me").customerId

fn statuses():
    if cache.empty or cache.any(e -> now() - e.lastUpdate > 20s):
        ensure_token()
        cache = get("/api/v3/customers/" + customer + "/encoders/status?wide=true")
    return cache

fn start(encoder, stream_profile, encoder_profile):
    ensure_token()
    patch("/api_v2.svc/encoders/" + encoder.id,
          {requestedStatus: "start", streamProfile: stream_profile, encoderProfile: encoder_profile})

Why it matters

Going live sits next to the rest of the service controls, and whoever’s running the booth can see at a glance whether the stream is actually up.

Stack

Links