EnumerateDevices issue with webView

74 views
Skip to first unread message

Awais Iqbal

unread,
Nov 15, 2023, 2:39:49 AM11/15/23
to discuss-webrtc
Hello everyone,
  I am facing and issue after WebView Nov 10 2023 release. I was calling 'navigator.mediaDevices.enumerateDevices' to get device ids but its return an object with empty key values. Please see the attached sc. Thank you for you help

Screenshot 2023-11-15 095057.png

Henrik Andreasson

unread,
Nov 15, 2023, 3:51:05 AM11/15/23
to discuss...@googlegroups.com
My best guess is that your application is missing some required permission(s).

You get a similar result on desktop platforms if you block access to camera and microphone while enumerating.

On Wed, Nov 15, 2023 at 8:39 AM Awais Iqbal <aw...@onescreensolutions.com> wrote:
Hello everyone,
  I am facing and issue after WebView Nov 10 2023 release. I was calling 'navigator.mediaDevices.enumerateDevices' to get device ids but its return an object with empty key values. Please see the attached sc. Thank you for you help

--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/01e0ef4b-1525-4fc5-9666-74a267ac2bfcn%40googlegroups.com.

Awais Iqbal

unread,
Nov 15, 2023, 2:10:19 PM11/15/23
to discuss...@googlegroups.com
Thank you Henrik,
   It seems that the issue started with the latest WebView version. Before this, only the label was missing in the 'enumerateDevices' method. After checking all permissions and successfully publishing the stream with both audio and video enabled, the problem became apparent. The root cause appears to be related to the fact that the local web pages loaded in the WebView are not served over HTTPS; instead, they are installed locally within the app's file system. This is likely causing the issue.
  Now, I'm looking for a workaround or hack to overcome this limitation and allow proper enumeration of devices in this specific scenario.



--

Awais Iqbal

Senior software engineer

OneScreen

aw...@onescreensolutions.com


Philipp Hancke

unread,
Nov 15, 2023, 2:28:25 PM11/15/23
to discuss...@googlegroups.com
This is likely https://bugs.chromium.org/p/chromium/issues/detail?id=1496784 which will hopefully be fixed soon (thank you Guido for providing the pointer)

Reply all
Reply to author
Forward
0 new messages