JS-OCR-demo icon indicating copy to clipboard operation
JS-OCR-demo copied to clipboard

MediaStreamTrack.getSources is deprecated, update it to MediaDevices.enumerateDevices()

Open srinusoft opened this issue 8 years ago • 4 comments

Hi,

i am building this as Cordova Project and copies all html and js files to my Project and camera is not opening when i am trying to take the picture. when i look at the logs it says "MediaStreamTrack.getSources is deprecated", Could you please let me know the alter native to this,

srinusoft avatar Nov 02 '16 10:11 srinusoft

Hi! AFAIK the replacement for this deprecated method is: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices . I'd appreciate PR if you'd be able to fix it in my project.

kdzwinel avatar Nov 02 '16 10:11 kdzwinel

Sorry for the confusion. i am building it as android app using cordova, i was missed to add some camera permissions. Now it is working fine but the text from image is not capturing correctly.

srinusoft avatar Nov 02 '16 13:11 srinusoft

well, the OCR library I'm using is not in the latest version - you can try updating it. You can also try using other, more promising, library - tesseract.projectnaptha.com . Also, note that using camera via web platform doesn't support focus AFAIK, so images may be blurred.

kdzwinel avatar Nov 02 '16 13:11 kdzwinel

Maybe this issue is the same. https://github.com/kdzwinel/JS-OCR-demo/issues/8

ve3 avatar Oct 23 '18 09:10 ve3