No source names in Firefox
klauswiesel opened this issue · 0 comments
klauswiesel commented
I am using the webcam contrrol and experience problems in Firefox [102.0.1 (64-bit)]
Using this code works in all other browsers:
` ngAfterViewInit(): void {
this.pollFunction = defer(() => from(WebcamUtil.getAvailableVideoInputs()));
startPoll<any>(
() => this.pollFunction,
value => value && value.filter(item => !!item.deviceId).length > 0,
{interval: 1000}
).pipe(
takeUntil(this.destroyed$),
).subscribe(devices => {
this.availableInputs = devices;
this.availableInputsForSelect = this.availableInputs.map(item => ({value: item.deviceId, label: item.label}))
if (!this.cameraId) {
this.cameraId = this.availableInputs[0].deviceId;
}
}
)
}`
For Firefox, I do not get the names for the cameras. Switching them works, camera function itself is working