Camera Permission

Android Webview

To allow Android Webview to visit camera, you need to override the onPermissionRequest method in your app:

Java

iOS Webview

To enable iOS Webview camera permission, you need the following adjustment:

  1. Inside info.plist file, set NSCameraUsageDescription to allow the app to access camera.

XML

  1. Config Webview instance to allow inline media playback, disable user action for playback, enable JavaScript, and enable JavaScript to automatically open windows.

Objective-C

  1. Before entering H5 Verfication Page, check and request for camera access first.

Swift

  1. (Optional) To avoid camera permission prompt in H5 every time.

Swift