Compatible with camera_utils of MediaPipe
https://code4fukui.github.io/Camera/
import { Camera } from "https://code4fukui.github.io/Camera/Camera.js";
const camera = new Camera(videoElement, {
onFrame: async () => {
// use videoElement as image
},
width: 1280,
height: 720,
backcamera: true,
});
camera.start();