{
  "id": 23909142,
  "title": "How Group Jam keeps everyone in sync without streaming a single byte of audio",
  "url": "https://urgent.news/2026/12/06/how-group-jam-keeps-everyone-in-sync-without-streaming-a-single-byte",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-06T21:28:12.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/team-spotube/how-group-jam-keeps-everyone-in-sync-without-streaming-a-single-byte-of-audio-56ig"
  },
  "original_language": null,
  "account": "Group Jam allows friends to listen to the same song simultaneously on their phones or desktops. Strangely, nobody questions whether the audio is streamed through the servers. The room server remains silent, relaying a few JSON frames that each device fetches and plays its own copy of the track. The challenge then arises: how to keep several independent players on various networks, with slightly incorrect clocks, in sync.\n\nThe solution involves a shared clock, a playback anchor published by the host, and guests that adjust their speed slightly rather than constantly jumping around. This approach is outlined in the core/jam/ component of the app, along with the room server in jam-server.\n\nClocks can be unreliable, so the first step is to estimate how far each device's clock is from the room server's clock. Similar to NTP, every guest sends a ping with its local time, and the server responds with its own time and the answer's arrival time. By calculating the offset, the server determines the clock's deviation from the true time. JamClock keeps track of the last 16 samples, selecting the one with the smallest round trip time as the most accurate offset estimate. Samples older than 15 minutes are discarded to prevent outdated estimates from persisting.\n\nOnce everyone shares a clock, playback can be described using a simple tuple. The host publishes a JamAnchor, indicating the track, its position in the queue, the position at server time, and the playback rate. Anyone can determine the current room position using this information. Importantly, the anchor stays valid until any change occurs, with the host updating it when the track, play state, player state, or next song's sources change. Coalescing requests with a minimum gap of 250ms between anchors prevents a flood of quick skips from overwhelming the room.\n\nA buffering host sends an anchor with advancing set to false, signaling that the room is paused. Guests then wait for the next anchor instead of moving ahead of the player that isn't progressing. This flag distinguishes between a paused room and a room waiting for the network, requiring only one boolean.\n\nEvery guest runs a small sync loop, checking the room's position using positionAt with the shared clock and comparing it to the position of its own player. The difference in position is the drift, and JamDriftCorrector decides how to address it. If there's nothing to follow, like a paused room or a buffering host, the loop sleeps until the room or local player changes, with a 30-second safety recheck. Three outcomes are possible: none (drift within a 120ms dead band), nudge (adjust playback rate to catch up), or seek (persistent drift exceeding 1.5 seconds).",
  "summary": "Group Jam lets a few friends listen to the same song at the same moment, each on their own phone or desktop. A common first question is \"so you stream the audio through your servers?\" No. The room server never touches audio. It relays a handful of small JSON frames, and every device fetches and plays its own copy of the track. That leaves a fun problem. How do you keep several independent…",
  "summary_source": "publisher",
  "key_points": [
    "Group Jam synchronizes playback without streaming audio",
    "Shared clock and playback anchor keep devices in sync",
    "Sync loop corrects drift between room and local player"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}