During yesterday’s I/O keynote, Google announced a rather fantastic new feature coming to the Chromecast: soon, your friends won’t need to be connected to your WiFi to be able to send things to your TV. As long as they’re in the same room, it should just work.

But how?

While Google’s Rishi Chandra mentioned yesterday that the new WiFi-less pairing system used a “variety of technologies” to determine when you’re near a Chromecast unit, he didn’t really breakdown what those technologies might be. Bluetooth? Some proprietary protocol that Google had cooked up? Magic?

Turns out, it’s closest to that last one — or at least, it’ll probably seem like magic to anyone without superhuman hearing.

Thanks to a post-Keynote presentation, we now have a better idea of how it’ll work: ultrasonic soundwaves, inaudible to the human ear.

Once you’ve configured your Chromecast to allow nearby devices to connect, the Chromecast will push a uniquely generated ultrasonic sound through your TV’s speakers. Encoded in that soundwave is everything a phone needs to know to get paired up. You can’t hear these sounds, but your phone can.

Apps using the Chromecast SDK will use your smartphone’s microphone to listen for these soundwaves. Once one is detected, it’ll offer up a Chromecast pairing button just as it would if you were on the same WiFi network.

Sound familiar? Google’s engineers have actually been playing with the idea of ultrasonic networking for at least the last year. At TechCrunch Disrupt SF last September, meanwhile, a company called SlickLogin debuted a method of using ultrasonic sounds for 2-factor authentication without the extra typing. They went on to be acquired just five months later. The buyer? You guessed it: Google.

[Via GigaOm]