iOS devices heating up
See original GitHub issueDescription We are using the plugin for scanning barcodes. Usually it is used in warehouses. We noticed that after a couple of minutes the camera and eventually the device itself get heated up and it is very obvious. You can feel it is overheated after five minutes. Although I never experienced it is reported that sometimes it ends up with application crashing.
It is very obvious on iPhone X and iPhone Xr. It is also observable in iPhone SE (2020) devices.
I forked the repo and changed discoverCaptureDevices function only to have builtInWideAngleCamera by changing the line to this:
return AVCaptureDevice.DiscoverySession(deviceTypes: [ .builtInWideAngleCamera ], mediaType: .video, position: .unspecified).devices
from this:
return AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInTripleCamera, .builtInDualCamera, .builtInTelephotoCamera, .builtInTrueDepthCamera, .builtInUltraWideCamera, .builtInDualWideCamera, .builtInWideAngleCamera], mediaType: .video, position: .unspecified).devices
I thought opening triple camera for simple barcode reading may be unnecessary and that is the reason why device was heating up. But it didn’t help.
Our app is a replacement of an old NativeScript app and that app doesn’t have this problem on barcode scanning. I tried some other Cordova/Phonegap plugins. Most of them has this issue except one. We are in no position of switching plugins right now. I wonder if there are any solutions to fix this issue or if I misconfigured something.
Steps to reproduce
- Open the camera
- Leave the device for 5 minutes
- Check the camera with your hand. Observe it is heated up
- Leave for another 10 minutes
- Check the whole device is heated up.
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top GitHub Comments
It should yes, you can just add the branch to your
package.json
and change the calls according to the interfaces (there is no more single-scan function) just astart
,pause
,resume
andstop
.https://github.com/capacitor-community/barcode-scanner/blob/ml-kit/src/definitions.ts
It is not finished, for example checking the permissions aso. is missing, but it should work in general for this testing purpose.
I was now able to merge the android version into the branch, this is a big step for the ml-kit version.
I still needs cleanup and my time is kinda limited at the moment unfortunately, but I will do my best to make progress as fast as possible.