Cannot Detect Available Devices

I’m using a tablet and my code does not get the available camera devices.

this.scanner.camerasFound.subscribe((devices: MediaDeviceInfo[]) => {
      this.hasDevices = true;
      this.availableDevices = devices;
});

this.available variable has no value after putting that lines of code on ngOnInit

html

<zxing-scanner #scanner start="true" [(device)]="currentDevice"></zxing-scanner>

Source: New feed
Source Url Cannot Detect Available Devices