File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1102,17 +1102,17 @@ extension RoomHardwareManagementMethods on Room {
11021102 final currentDeviceId =
11031103 engine.roomOptions.defaultCameraCaptureOptions.deviceId;
11041104
1105- // Always update roomOptions so future tracks use the correct device
1106- engine.roomOptions = engine.roomOptions.copyWith (
1107- defaultCameraCaptureOptions: roomOptions.defaultCameraCaptureOptions
1108- .copyWith (deviceId: device.deviceId),
1109- );
1110-
11111105 try {
11121106 if (track != null && selectedVideoInputDeviceId != device.deviceId) {
11131107 await track.switchCamera (device.deviceId);
11141108 Hardware .instance.selectedVideoInput = device;
11151109 }
1110+
1111+ // Always update roomOptions so future tracks use the correct device
1112+ engine.roomOptions = engine.roomOptions.copyWith (
1113+ defaultCameraCaptureOptions: roomOptions.defaultCameraCaptureOptions
1114+ .copyWith (deviceId: device.deviceId),
1115+ );
11161116 } catch (e) {
11171117 // if the switching actually fails, reset it to the previous deviceId
11181118 engine.roomOptions = engine.roomOptions.copyWith (
You can’t perform that action at this time.
0 commit comments