jhuckaby / webcamjs

HTML5 Webcam Image Capture Library with Flash Fallback
MIT License
2.5k stars 1.11k forks source link

Webcam.js rear camera not rotating properly #293

Open jagtapanil036 opened 5 years ago

jagtapanil036 commented 5 years ago

I'm using Webcam.min.js library to capture image. When i'm using Tablet horizontally then it's working properly. But when i'm doing Tablet vertically then camera not rotating

My code is: `Webcam.set({ width: 320, height: 240, image_format: 'jpeg', jpeg_quality: 90, flip_horiz: true, constraints: { video: true, facingMode: "environment" } }); Webcam.attach( '#my_camera' );

this.take_snapshot= function take_snapshot() { Webcam.snap( function(data_uri) { document.getElementById('results').innerHTML = ''; } ); }`

jijth commented 4 years ago

I'm using Webcam.min.js library to capture image. When i'm using Tablet horizontally then it's working properly. But when i'm doing Tablet vertically then camera not rotating

My code is: `Webcam.set({ width: 320, height: 240, image_format: 'jpeg', jpeg_quality: 90, flip_horiz: true, constraints: { video: true, facingMode: "environment" } }); Webcam.attach( '#my_camera' );

this.take_snapshot= function take_snapshot() { Webcam.snap( function(data_uri) { document.getElementById('results').innerHTML = ''; } ); }`

You got any solutions,Im facing this issue past 6 days , can you share any solutions please.