How it works
A Sonos speaker will play almost anything, provided fetching it was the speaker’s idea. Thaumic Cast arranges for your browser’s audio to be the speaker’s idea.
The journey
Section titled “The journey”- The extension listens to the tab. When you press Cast, your browser hands the extension that tab’s sound. (With browser-wide capture, the desktop app takes the whole browser’s sound from Windows instead.)
- It sends the sound to the app. The extension passes the audio to the desktop app or Thaumic Cast Server, as it is (PCM, the default) or made smaller (AAC or FLAC), depending on the Quality you choose.
- The app tells the speakers where to fetch it. It gives each room an address on your computer, and tells it to play from there. For several rooms, it groups them first, so they play in step.
- The speakers fetch it. Each speaker comes to your computer and fetches the audio over HTTP, the way it would fetch a radio station.
That last step is why the speakers have to be able to reach your computer, and why a firewall or VPN in the way gets you silence: see Firewall and ports.
Why it stays in the house
Section titled “Why it stays in the house”Your audio never leaves your network: your tab, your computer, your speakers. There is no account, because there is nobody to have an account with, and no cloud for the audio to go through. The extension and the app have no trackers and no analytics. See Privacy.
Why the speakers play late
Section titled “Why the speakers play late”A little of the audio is held back at each step, on purpose, so that a stalled Wi-Fi link or a busy computer does not become a gap. The app holds some (Smoothing), each speaker is given some in advance (the Speaker head start), and the speakers add a delay of their own. Together they put the sound a moment behind your browser.
A song never finds out. A film does, which is what video sync is for. The settings, and what each costs, are in Sound is late.
Under the bonnet
Section titled “Under the bonnet”The architecture overview, on GitHub, has the details for the curious, and the source is all there.