Every device has its own clock, and no two agree exactly. So the first thing a guest does after joining is ask the host the time, many times over. Each question carries the guest’s own time when it left, the host stamps its time when the question arrives and again when it sends the answer, and the guest notes when the answer comes back. From those four times it can work out both how long the trip took and how far its clock differs from the host’s.
A single answer can be thrown off by a busy Wi-Fi network, so the guest keeps asking a few times a second and trusts only the quickest round trips, where there was no time for anything to get in the way. It also watches how the difference changes over minutes, because cheap clocks run slightly fast or slow.
From a shared clock to the same frame
When the host presses play, it doesn’t say “play now”; it says “the film was at this point at this moment on my clock, playing at normal speed”. Every device turns that into “where should I be right now?”, compares it with the frame actually on its screen, and corrects. Small errors are fixed by playing a fraction faster or slower (between 0.3 and 3 per cent, too little to hear); a jump of more than about 300 ms is fixed with a seek. Each device reports how far off it is, shown as Excellent, Good, Fair or Poor next to its name.