Patent attributes
An electronic device may include an optical proximity sensor system. The optical proximity sensor system may be a transreflective optical proximity sensor system having a light emitter that emits light into a light-emitting region and a light detector that detects light in a light-detecting region. Control circuitry in the device can use the transreflective optical proximity sensor system to detect objects in an object detection region formed where the light-emitting region and light-detecting region overlap. The electronic device may be a pair of headphones in which housing structures such as housing walls define ear cup cavities. Speakers may be provided in the ear cups of the headphones to provide sound to the ear cup cavities. The transreflective optical proximity sensor system can detect the presence of a user's ear in an ear cup cavity.