client-sdk-flutter icon indicating copy to clipboard operation
client-sdk-flutter copied to clipboard

[bug] list of mics and camera titles are empty from Hardware.instance.enumerateDevices(); on FIREFOX flutter WEB and return weird device ids

Open patrikheinonen opened this issue 2 years ago • 4 comments

Describe the bug

[bug] list of mics and camera titles are empty from Hardware.instance.enumerateDevices(); on FIREFOX flutter WEB and return weird device ids

To Reproduce

  1. Build the example app: flutter build web --release
  2. host it somewhere

Expected behavior

List of mics and camera titles should not be empty and the device ids should be usable like they are on other browsers.

Platform information

Flutter web Firefox

  • Flutter version:

Flutter (Channel stable, 3.16.0, on macOS 14.0 23A344 darwin-arm64, locale en-FI)

  • Plugin version:

Livekit latest: 1.5.3

  • Flutter target OS:

WEB FIREFOX. Specifically Firefox

  • Flutter target OS version:

Web Firefox

  • Flutter console log:

patrikheinonen avatar Nov 30 '23 09:11 patrikheinonen

It seems that firefox needs to run getUserMedia before it can get device.label https://stackoverflow.com/questions/46648645/navigator-mediadevices-enumeratedevices-not-display-device-label-on-firefox

I did some experiments in dart-webrtc and confirmed this

cloudwebrtc avatar Dec 01 '23 04:12 cloudwebrtc

@cloudwebrtc Is a fix coming related to this or do I need to run the method myself?

patrikheinonen avatar Dec 06 '23 13:12 patrikheinonen

This issue seems to have to be solved in the app, getUserMedia displays the video preview and then gets the device list.

cloudwebrtc avatar Dec 11 '23 03:12 cloudwebrtc

@cloudwebrtc How should I run this method in flutter/dart code?

patrikheinonen avatar Dec 11 '23 07:12 patrikheinonen