Future AirPods could use ultrasonics to detect proper ear positioning
A future model of AirPods may be able to detect when they are not properly seated in a user's ear using ultrasonic ranging, and either alert the wearer, or reroute the audio to another device.
Source: appleinsider.com