The Player Wars
Three days. Four fix commits. One iOS Safari bug that nearly broke me.
The goal was simple. Unify the show page and shuffle page into one player experience. Same icon controls, same overlay behavior, same fullscreen mode. One design language across the whole site.
The reality. YouTube’s iframe API does not play nicely with iOS Safari. Touch events get swallowed. CSS position: fixed fullscreen doesn’t work the same way. And Firebase auth popups? On iOS they redirect you to a blank page and never come back.
The auth saga. We tried signInWithPopup. Broke on mobile Safari. Switched to signInWithRedirect. Broke on desktop. Added a redirect fallback for mobile. Still broke. Tried proxying auth through our own domain for Safari ITP. That made everything worse. Four commits of “fix”, “revert”, “fix again”, “revert to popup.”
The fix. signInWithPopup. Always. On every device. The first thing we tried was the right answer. We just needed to stop overthinking it.
The lesson. When debugging across browsers and devices, the matrix of possibilities makes you want to build clever abstractions. Don’t. Pick the simplest approach that works everywhere and commit to it. If it doesn’t work everywhere, pick the next simplest one. Clever fallback chains are where bugs go to hide.