livekit / client-sdk-flutter

Flutter Client SDK for LiveKit
https://docs.livekit.io
Apache License 2.0
243 stars 120 forks source link

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

Open patrikheinonen opened 9 months ago

patrikheinonen commented 9 months ago

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 (Channel stable, 3.16.0, on macOS 14.0 23A344 darwin-arm64, locale en-FI)

Livekit latest: 1.5.3

WEB FIREFOX. Specifically Firefox

Web Firefox

cloudwebrtc commented 9 months ago

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

patrikheinonen commented 9 months ago

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

cloudwebrtc commented 9 months ago

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

patrikheinonen commented 9 months ago

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