There is no reason for them to run on the main thread, it's safe to call
AVFoundation functions on threads other than the main thread.
The previous code made an incorrect claim about the thread in which the audio
route change notification selector is called: it's called on a secondary thread:
https://developer.apple.com/documentation/avfoundation/avaudiosessionroutechangenotification
pull/3326/headjitsi-meet_3256
Saúl Ibarra Corretgé6 years agocommitted byPaweł Domas