This seems to be an issue with the daily js forked version of react native webrtc and specifically this function
- (AVCaptureSession *)configuredCaptureSession {
AVCaptureSession *captureSession = [[AVCaptureSession alloc] init];
// Don't automatically configure application audio session, to prevent
// configuration "thrashing" once WebRTC audio unit takes the reins.
captureSession.automaticallyConfiguresApplicationAudioSession = NO;
AVCaptureDevice *audioDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
if (!audioDevice) {
return nil;
}
NSError *inputError;
AVCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioDevice error:&inputError];
if (inputError) {
return nil;
}
if ([captureSession canAddInput:audioInput]) {
[captureSession addInput:audioInput];
}
else {
return nil;
}
AVCaptureAudioDataOutput *audioOutput = [[AVCaptureAudioDataOutput alloc] init];
if ([captureSession canAddOutput:audioOutput]) {
[captureSession addOutput:audioOutput];
}
else {
return nil;
}
return captureSession;
}
This line AVCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioDevice error:&inputError]; seems to be the culprit and its causing the permissions to be triggered before you even unmute yourself on iOS.
This seems to be an issue with the daily js forked version of react native webrtc and specifically this function
- (AVCaptureSession *)configuredCaptureSession { AVCaptureSession *captureSession = [[AVCaptureSession alloc] init]; // Don't automatically configure application audio session, to prevent // configuration "thrashing" once WebRTC audio unit takes the reins. captureSession.automaticallyConfiguresApplicationAudioSession = NO; AVCaptureDevice *audioDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; if (!audioDevice) { return nil; } NSError *inputError; AVCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioDevice error:&inputError]; if (inputError) { return nil; } if ([captureSession canAddInput:audioInput]) { [captureSession addInput:audioInput]; } else { return nil; } AVCaptureAudioDataOutput *audioOutput = [[AVCaptureAudioDataOutput alloc] init]; if ([captureSession canAddOutput:audioOutput]) { [captureSession addOutput:audioOutput]; } else { return nil; } return captureSession; }This line
AVCaptureDeviceInput *audioInput = [AVCaptureDeviceInput deviceInputWithDevice:audioDevice error:&inputError];seems to be the culprit and its causing the permissions to be triggered before you even unmute yourself on iOS.