diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/photo-camera-input.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/photo-camera-input.component.ts index aebc500faf..f61f9ef612 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/photo-camera-input.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/photo-camera-input.component.ts @@ -283,6 +283,13 @@ export class PhotoCameraInputWidgetComponent extends PageComponent implements On window.navigator.mediaDevices.getUserMedia(videoTrackConstraints).then((stream: MediaStream) => { if (init) { this.isShowCamera = true; + if (this.availableVideoInputs.find((device) => device.deviceId === '')) { + PhotoCameraInputWidgetComponent.getAvailableVideoInputs().then((devices) => { + this.singleDevice = devices.length < 2; + this.availableVideoInputs = devices; + this.ctx.detectChanges(); + }); + } } this.mediaStream = stream; this.videoElement.srcObject = stream;