Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera and audio permission issue #306

Open
VarshaMenon opened this issue Oct 14, 2022 · 1 comment
Open

Camera and audio permission issue #306

VarshaMenon opened this issue Oct 14, 2022 · 1 comment

Comments

@VarshaMenon
Copy link

Video calling feature was working perfectly with webview until almost 3 months ago. Recently it's not supporting camera and audio functionality, even browser and application have both of these permissions. Would like to know is it because of any recent update with webview or chromium or with anything else, as it was working properly before.

Manifest permissions:

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIDEO_CAPTURE" />
<uses-permission android:name="android.permission.AUDIO_CAPTURE" />
<uses-permission android:name="android.webkit.resource.AUDIO_CAPTURE" />
<uses-permission android:name="android.webkit.resource.VIDEO_CAPTURE" />

Please anyone respond to this issue, and thanks in advance. Attaching the screenshot for more information.

camera_permission_issue

microphone_permission_issue

@ryza1
Copy link

ryza1 commented Oct 16, 2024

I found a great solution. Accidentally on the normal webview, noticed that reloading the page worked (by rotating the device)
Force this event order:

  • loadUrl() //has no permissions yet
  • PermissionListener request //requests permissions
  • loadUrl() //loading it again will use the cached page but now it has permissions granted of course. All cameras, all audio devices. Even Bluetooth audio

In my case I reload the page inside the onPermissionRequest function once all permissions have been requested. Also Irequest permissions really early in javascript so that the reload is not perceptable to the user. I don't know if there is a better way but this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants