0

I'm trying to access the camera and microphone for a webview displayed in a SFSafariViewController.

I think I should respond to camera and microphone access requests made by the browser but I can't find a way to do it.

On Android we have an override in WebChromeClient to do exactly that:

public override void OnPermissionRequest(PermissionRequest request)
{
    request.Grant(new String[] { PermissionRequest.ResourceAudioCapture, PermissionRequest.ResourceVideoCapture });
}

Do I have any chance to no being forced to fallback to using Safari Directly instead of SFSafariViewController?

Thanks in advance.

  • Hi, `SFSafariViewController` can not do that . You can use webview to call native code to access permissions . – Junior Jiang May 11 '20 at 07:03
  • Do you know any example that I can start with? –  May 11 '20 at 07:08
  • Sorry , I have no direct sample to explain that .That's only half part of work , the left work need to transfer the data from camera and audio to webview . Maybe you can refer to this discussion to start with . https://stackoverflow.com/questions/36559483/xamarin-ios-communication-between-javascript-and-c-sharp – Junior Jiang May 11 '20 at 07:31

0 Answers0