Skip to content

Commit 29963ce

Browse files
committed
fix: camera toggle along with flip
1 parent 30f8ce2 commit 29963ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/client/src/devices/CameraManager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,13 @@ export class CameraManager extends DeviceManager<CameraManagerState> {
4343
await videoTrack?.applyConstraints({
4444
facingMode: direction === 'front' ? 'user' : 'environment',
4545
});
46-
this.state.setDirection(direction);
47-
return;
4846
}
4947
// providing both device id and direction doesn't work, so we deselect the device
5048
this.state.setDirection(direction);
5149
this.state.setDevice(undefined);
50+
if (isReactNative()) {
51+
return;
52+
}
5253
this.getTracks().forEach((track) => track.stop());
5354
try {
5455
await this.unmuteStream();

0 commit comments

Comments
 (0)