Issue
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.
Solution
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
Answered By - Siarhei
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.