How can an upload extension tell when the user disables their mic?

It seems like there is no notification or callback when the user toggles their mic from control centre when using a ReplayKit Broadcast Upload Extension.


I want to reflect the state of the host's mic on the UI of my viewing app, so that the viewers know if the host is sending audio or not. My current approach is to assume that the mic is disabled initially, then I can notice that it's been turned on as soon as I receive the first mic audio sample in processSampeBuffer(), and I tried to set a timer to check if any mic audio samples had been received in the last 10 seconds, and assume the mic had been turned off if not, but unfortunately the extension still receives mic audio sample buffers even when the mic has been disabled.


Since it doesn't receive them when the mic has never been turned on, I assume this is some kind of optimization at the OS level, but is there any way to definitively know when the user taps that Microphone Audio on/off button in control centre while the extension is broadcasting?

Replies

Hi,


Did you get any solution for the above mentioned problem.