-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Letters are reversed #13
Comments
Set facingMode to 'environment' and override getVideoInputs like this works for me: import Webcam from 'webcam-easy';
import b64toBlob from 'b64-to-blob';
class NoMirrorWebcam extends Webcam {
// override function as facingMode is set to 'user' when webcamList == 1 -> facingMode decides mirroring
getVideoInputs(mediaDevices) {
const webcamList = super.getVideoInputs(mediaDevices)
this._facingMode = 'environment';
return webcamList;
}
} |
hey @novelnet where should I place this block to fix the issue ? I have the webcam-easy.js which has the WebCam class .And in my code I initialize the object like this : thanks. |
Yeah, I can confirm that the suggestion is working. One option is to create that class and export it as default, I like to do it by creating an index.js inside a Folder with the same name as the class has.
Then in the script you are using the webcam you should import the class NoMirrorWebcam instead of the one installed by npm (Webcam),
Instead of using Webcam you should use NoMirrorWebcam |
Hi,
Please help me, how to fix a letters are reversed bug after snap a picture.
Thank you.
The text was updated successfully, but these errors were encountered: