javascript- unable to convert canvas to image data
问题 guys! I'm trying to make a demo using which a user will be able to capture an image from the web camera enabled through his browser and this image will be saved in the backend by passing it to a PHP service using AJAX call. I'm able to capture as canvas but not being to convert it into image data. I'm getting canvas is undefined error Setup is pretty simple. HTML <video id="videoElement" autoplay></video> <button id="snap">Snap Photo</button> <canvas id="canvas" style="display:none" ></canvas