0

I've created the VideoConferning App for Using Webrtc, and also made the app for using Cordova in ios, but the issue was when I opened the app, each time it triggers the permissions for the camera and microphone. here are my plugins

cordova-plugin-camera 6.0.0 "Camera"
cordova-plugin-file 7.0.0 "File"
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-media 6.1.0 "Media"
cordova-plugin-network-information 3.0.0 "Network Information"

cordova ios Platform Version;

Installed platforms:
  ios 6.2.0

Ref Image

enter image description here

how to modify the always allow for that permissions?

maranR
  • 363
  • 8
  • Use this plugin to check and request permission `https://ionicframework.com/docs/native/diagnostic` – Ravi Ashara Nov 09 '22 at 06:33
  • @RaviAshara I've Tried this but not work, that problem was every time the review on the in-app browser detected the camera and microphone, for your reference I've added image – maranR Nov 11 '22 at 09:55

1 Answers1

2

finally i found the solution for this every time ask permission for cordova ios webview

Add this Function on CDVWebViewUIDelegate.m

- (void)webView:(WKWebView *)webView requestMediaCapturePermissionForOrigin:(WKSecurityOrigin *)origin initiatedByFrame:(WKFrameInfo *)frame type:(WKMediaCaptureType)type decisionHandler:(void (^)(WKPermissionDecision))decisionHandler API_AVAILABLE(ios(15.0)) API_AVAILABLE(ios(15.0)){  decisionHandler(WKPermissionDecisionGrant);
    
}
maranR
  • 363
  • 8