Shared clock

How synchronization works

Every GiveMood station runs on one UTC timeline. Listeners do not “follow” each other — they all ask the same question: what should be playing right now?

The shared UTC timeline

When a station is created, we store a start moment in UTC. From that instant, the broadcast is a continuous loop of the station’s tracks. Elapsed time since start, wrapped by the full cycle length, is the live position — the same number for Tokyo, Lisbon, and São Paulo.

No host needs to stay in the tab. Closing your laptop does not pause the station for everyone else, because the timeline is calculated from the clock, not from a room of connected players.

Elapsed time maps into the track cycle Station start, elapsed seconds modulo cycle length, then track and seek offset. Station start UTC timestamp now − start elapsed seconds elapsed % cycle live offset Track A Track B · you are here Track C
Live position = (now − start) modulo the full playlist cycle.

How tracks are calculated

Each playlist or single video on the station is expanded into a list of tracks with durations. Those lengths are laid end to end into one cycle. The live offset falls inside a specific track; the leftover seconds inside that track become the seek position for the YouTube embed.

When the browser learns a more accurate duration from the player, it can report that back so the map stays honest. The goal is the same bar for every listener, not a perfect studio clock — but the shared slot is what keeps everyone together.

Late joining

A friend who opens the link twenty minutes late does not start at track one. Their player loads the current video and seeks to the live second. That is the whole product idea in one behavior.

1

Open the station

The page fetches the live state: which track, which seek, server time.

2

Press Listen Live

The embed loads that video and seeks to the offset. You are already mid-song with everyone else.

3

Stay locked

The client re-checks the timeline while you listen, so drift and tab sleep do not quietly pull you out of sync.

When a song cannot play in your country

YouTube can block a video by region. On GiveMood, that listener waits on the shared slot and sees that the song cannot be played there. They do not skip to the next track while others are still on the blocked one. When the timeline moves on, their player moves with it.

Same timeline for every country. Local playback may wait; nobody jumps the queue.

What sync is not

For the product framing of those differences, see Radio vs playlist vs streaming. For who builds this and why, see About GiveMood.

FAQ

What happens if I join late?

You land on the current track and second. The station does not restart for you.

Does the host need to stay online?

No. The timeline is computed from the station’s UTC start and track map.

What if a song is blocked where I live?

You wait on that song’s slot. You do not skip ahead of everyone else.