Android Question WebRTC - from website side

rosippc64a

Active Member
Licensed User
Longtime User
Hi All,
I did a small sample code - largely - found here.
It uses webview and shows a webpage (url1) that could use the camera. But the camera isn't appear, only this:
1637352654426.png

I put another url (found also here) the same app, that looks good:
1637352757497.png

So I think the problem is in the webpage 1.
But when I test the webpage (url1) in the same device in Chrome browser, it works well.
None of these websites are mine and I am not an experienced web developer.
Can I tell the web developer, that he needs to modify something to work his webpage well in my android webview, or not?
thanks in advance
Steven
 

Ivica Golubovic

Active Member
Licensed User
Have you tried UltimateWebView Example. I put a lot of effort just for WebRTC in this library. If you have the time and will to try, I'm interested in the result because I haven't found a single site where WebRTC didn't work. Thanks.
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
Looks like the arrakis webpage doesn't ask permission for using camera. Here is the log:
B4X:
JANUS (https://janus.conf.meetecho.com/echotest.html, shows camera image)
UltimateWebView1.LoadUrl(...)
android.permission.CAMERA
android.permission.RECORD_AUDIO
android.permission.MODIFY_AUDIO_SETTINGS
ARRAKIS (one of the submenu of this url: https://arrakis.demo.promera.systems/, doesn't show camera image)
UltimateWebView1.LoadUrl(...)
JANUS (works)
UltimateWebView1.LoadUrl(...)
android.permission.CAMERA
android.permission.RECORD_AUDIO
android.permission.MODIFY_AUDIO_SETTINGS
ARRAKIS (doesn't work)
UltimateWebView1.LoadUrl(...)
 
Last edited:
Upvote 0

Ivica Golubovic

Active Member
Licensed User
Very strangely, a camera is necessary for the operation of a WebRTC video stream. If there is no request for camera permission, WebViewChromeClient will automatically deny access to the resource. If the permissions for the camera are not displayed in the logs, as you say, then access to the necessary resources is automatically denied and that is the main reason why WebRTC does not work. I have not had such a case.

logs.png
 
Upvote 0

rosippc64a

Active Member
Licensed User
Longtime User
It depends also on device. I tried the same code in Redmi note, android 10, where the code works well, but the device, where this code SHOULD work is android 9 POS (latest webview). In the meantime I found a basic pattern for using the camera and it works too.
So I think it is the end, I will talk to the developer to change the source of the web page.
 
Upvote 0
Top