Detecting removal of one AirPod from my ear

The Music app works in the following way:

1. Both AirPods is in my ears.

2. I start playback.

3. I remove one AirPod from my ear.

4. Music pauses.


How can I detect the removal? Which event fires in this case?


Thanks,


Zsolt

Been a year and I still don't see a public airpod API.

tormazs,


The MPRemoteCommandSample shows how media applications can support the automatic pause and play functionality with the AirPods when taking them in and out of the ear.


MPRemoteCommandSample: Using MPRemoteCommandCenter respond to remote control events

https://developer.apple.com/library/content/samplecode/MPRemoteCommandSample/Introduction/Intro.html

Detecting removal of one AirPod from my ear
 
 
Q