Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebRTC error inside Chromium WebView: "CheckMediaAccessPermission: Not supported"

Tags:

I'm trying to show WebRTC chat in WebView. According to this documentation, WebView v36 supports WebRTC. For my test I'm using a device with Chrome/39.0.0.0 and I have added permissions to the AndroidManifest.xml file:

<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <user-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> 

but when I enter into the chat, I see a Chromium error log (device doesn't show \ translate anything, only 'loading' progress bar):

W/AudioManagerAndroid: Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO W/AudioManagerAndroid: No audio device will be available for recording E/chromium: [ERROR:web_contents_delegate.cc(178)] WebContentsDelegate::CheckMediaAccessPermission: Not supported. E/chromium: [ERROR:web_contents_delegate.cc(178)] WebContentsDelegate::CheckMediaAccessPermission: Not supported. W/AudioManagerAndroid: Requires MODIFY_AUDIO_SETTINGS and RECORD_AUDIO W/AudioManagerAndroid: No audio device will be available for recording D/ChromiumCameraInfo: Camera enumerated: front 

Tested on a real device, Android 5.1.1.

like image 756
Siarhei Avatar asked Aug 12 '16 12:08

Siarhei


People also ask

Does WebView support WebRTC?

The good thing is that the Webview in Android also supports WebRTC. So built-in application browsers such as the one used by Facebook or Slack also end up supporting WebRTC experiences.

What is WebView Chromium?

Android WebView is one of the six supported platforms for Chromium. Here are slides from a presentation at BlinkOn 3 about how the architecture of Android WebView differs from that of other Chromium platforms. Documentation on. tile memory management.

Is Android WebView based on Chromium?

Since Android 4.4 (KitKat), the WebView component is based on the Chromium open source project.


1 Answers

additional request for permissions is needed

webView.setWebChromeClient(new WebChromeClient(){         @TargetApi(Build.VERSION_CODES.LOLLIPOP)         @Override         public void onPermissionRequest(final PermissionRequest request) {                 request.grant(request.getResources());         }     }); 

update but it not working for audio capture

UPDATE found working google-sample code here

like image 114
Siarhei Avatar answered Sep 24 '22 13:09

Siarhei