The iOS microphone recording indicator
Understand how the iOS microphone recording indicator works with Vivox.
Read time 1 minuteLast updated 2 days ago
iOS displays the red bar/orange dot recording indicator while the microphone is in use. When an iOS device is muted by using IAudioDevices::SetMuted(bool value), the Vivox SDK accesses the capture device (microphone) but does not collect or transmit any audio. This results in the recording indicator displaying. To hard mute and prevent the recording indicator from displaying, set the capture device to IAudioDevices::NullDevice():
To unmute, set the capture device to IAudioDevices::CommunicationDevice():// Assumes an IClient *MyClient;const IAudioDevice &NewActive = MyClient->AudioInputDevices().NullDevice();IAudioDevices::FOnSetActiveDeviceCompletedDelegate SetActiveDeviceCompletedCallback;SetActiveDeviceCompletedCallback.BindLambda([](VivoxCoreError Status, const FString DeviceId){ // DeviceId should match "No Device" UE_LOG(LogTemp, Log, TEXT("SetActiveDevice [Input] Completed (%d): %s"), Status, *DeviceId);});MyClient->AudioInputDevices().SetActiveDevice(NewActive, SetActiveDeviceCompletedCallback);
// Assumes an IClient *MyClient;const IAudioDevice &NewActive = MyClient->AudioInputDevices().CommunicationDevice();IAudioDevices::FOnSetActiveDeviceCompletedDelegate SetActiveDeviceCompletedCallback;SetActiveDeviceCompletedCallback.BindLambda([](VivoxCoreError Status, const FString DeviceId){ // DeviceId should match "Default Communication Device" UE_LOG(LogTemp, Log, TEXT("SetActiveDevice [Input] Completed (%d): %s"), Status, *DeviceId);});MyClient->AudioInputDevices().SetActiveDevice(NewActive, SetActiveDeviceCompletedCallback);