Developer
Log in

Control API

Updates

A client can ask whether a newer Studio is out, show the download's progress, and start the install. It can never start one while the streamer is live.

How Studio updates

Studio checks its update channel 20 seconds after its window opens, then every six hours (people can turn automatic checks off in Settings › Updates). A check fetches only a small, signed manifest, so it's allowed while live. Downloading and installing are not.

Every update is signed by Legendre Media Inc. Studio checks the manifest's signature before it reads anything in it, and checks the download's size and SHA-256 before anything is installed, and again right before it's used.

Channel Who it's for
stable Everyone. The default.
beta Invited Velum testers.
internal The Velum team.

The busy rule

Studio never downloads or installs an update while it's live, recording or keeping a replay buffer. Whoever asks gets the same answer: the Software update window, a download already running (it pauses and resumes after), and the control API.

So update.install from a client is refused with -32015 (unavailable), and its message says what's going out. A remote press never starts something the streamer can't watch.

Checking

update.check asks the channel whether there's a newer Studio and answers once it knows, with the update topic's value. Nothing is downloaded.

JSON-RPC
→ { "jsonrpc": "2.0", "id": 1, "method": "update.check" }
← { "jsonrpc": "2.0", "id": 1, "result": { "state": "available", "available": true, "current_version": "0.1.0", "channel": "stable", "version": "0.2.0", "…": "…" } }

Installing

update.install downloads the update on offer and checks its signature and checksum. The Studio window then shows Restart to update. With "restart": true, Studio restarts into the new version by itself once it's verified.

It's refused:

  • while Studio is live, recording or keeping a replay buffer;
  • before a check has found anything;
  • on a Flatpak, which its package manager updates.

Following progress

Subscribe to the update topic to show where things are:

Field Meaning
state idle, checking, available, downloading, ready or error
available An update is on offer
current_version, channel This Studio, and the channel it follows
latest The newest release on the channel, once checked
version, date, notes, size The update on offer; notes is Markdown
progress, downloaded_bytes 0 to 1 while downloading, 1 once ready; pushed every second while downloading
install_pending, waiting_for Update now was pressed in Studio while busy: it starts once that ends
updates_itself A Flatpak, which its package manager updates
error, last_checked_ms Why the last check failed, and when Studio last checked

Every field and its type is in the topic reference. The actions are update.check and update.install.

to open · ↑ ↓ to move · Esc to close