B2Gaudio - one iPad plays the movie, everyone else hears it in sync on their own headphones

Wait 5 sec.

I built this, solo. It's free with one small ad and no account. The release at the end of September finally does the thing I wanted from it at the start: a movie plays in landscape on one iPhone or iPad, and everybody else hears the audio in sync on their own phone through their own headphones. No splitter, no sharing an earbud, nobody holding the device at an angle for two people. A tray table on a plane is the case I had in mind, and the back of a car or a bus works the same way. Under that it's a general audio-sync app. One phone hosts, the rest tap join, and every phone plays the same moment. It takes your own music files, Apple Music (each person needs their own subscription), podcasts, LibriVox audiobooks, and the audio track off a video. Where there's no network at all, the phones connect straight to each other over Apple's peer-to-peer WiFi, so a car in a dead zone is fine for anything already downloaded. Almost none of the difficulty was in the audio. It was in getting several phones to agree on what time it is. On join they settle a shared clock with an NTP-style exchange, taking the median and discarding round-trip outliers. Then the host never says "play now". It says "start at this instant", and each phone translates that into its own clock and schedules it there. That one layer of indirection is the entire reason somebody can join halfway through a track and land in the right place instead of restarting it for everyone. My favorite bug came out of the outlier rejection. On a congested link every early sample looks like an outlier, so a joining phone would end up with a clock offset of exactly zero. Zero isn't "I don't know yet", it's a confident wrong answer, and every scheduling decision downstream trusts it completely. Now the best rejected sample gets adopted provisionally until a clean one turns up. Once it's playing, drift on local files is pulled back by nudging the playback rate a fraction of a percent, which nobody can hear, rather than seeking, which everybody can. Apple Music exposes no playback rate at all, only seek, and a seek takes something like 600 ms to land. So there each re-sync aims slightly ahead of the host, by about half the drift the next window is going to build up, which roughly halves the worst-case error for the same number of audible seeks. Limits, plainly: iPhone and iPad only, iOS 17 and up, no Android. No Bluetooth, no AirPlay and no CarPlay; it's a WiFi network or the phones' own direct link, and not going through Bluetooth is a good part of why it holds together. A phone joining a video gets the audio, not the picture. And it isn't sample-accurate. Steady-state drift on local files is typically in the tens of milliseconds. It's for people in the same room or the same car, not for listening along with someone in another city. https://apps.apple.com/app/apple-store/id6759938468?pt=128605371&ct=rd-sideproject&mt=8 I can only get a handful of phones in one place to test with. If you run it with four or more, I'd like to hear what falls over.   submitted by   /u/Telasight [link]   [comments]