-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
Hi, we are recently experiencing a weird issue and I can't wrap my head around it what this code should do.
Changing the camera via setVideoInputDevice
does not work. There are no errors thrown, the camera just stays the same.
During debugging I had the following in lib/src/core/room.dart:

- we start with the new
device=aae9
- then we notice the
currentDeviceId=2125
- then we update the
roomOptions
in L1106 - then we check if
selectedVideoInputDeviceId != device.deviceId
- but as L1106 updated the
roomOptions
to have the new device, the following code returns the new device, so that theif
in L1112 is always false and the device does not change
- but as L1106 updated the
String? get selectedVideoInputDeviceId =>
roomOptions.defaultCameraCaptureOptions.deviceId ??
Hardware.instance.selectedVideoInput?.deviceId;
In short: roomOptions.defaultCameraCaptureOptions
already has the new value, and the camera would be only switched if it had NOT the new value
Was it maybe intended to check for currentDeviceId != device.deviceId
? That would make more sense to me.
To Reproduce
Use the example and try to change the camera. Nothing changes.
Expected behavior
The camera should change.
Platform information
- Flutter version: 3.35.2
- Plugin version: 2.5.0+hotfix.3
- Flutter target OS: Web and Windows
Metadata
Metadata
Assignees
Labels
No labels