You can see them doing that in the video. The screens must be immediately adjacent and aligned orthogonally. It aligns on a finger drag from one device straight across to the other.
They've gotta have some smarts about the different bezel thicknesses for all iOS devices; I don't think finger velocity and displacement time would be accurate enough for determining the horizontal spacing.