lundi 20 décembre 2021

Video aspect ratio changes automatically on the firefox web browser

I'm working on a project, I'm accessing the camera using javascript and the aspect ratio of the camera is working fine on CHROME but when I'm testing it on the Firefox browser it changes the aspect ratio automatically

this is a CHROME result chrome result

and FIREFOX result enter image description here

and my code <video id="video" width="280px" height="480px"></video>

const videoElement = document.getElementById("video");
const camera = new Camera(videoElement, {
  onFrame: async () => {
    await model.send({ image: videoElement });
  },
  width: 280,
  height: 480,
});
camera.start();

let me know if anyone can help with this




Aucun commentaire:

Enregistrer un commentaire