// Get the video element var video = document.getElementById('videoElement'); // Check if the browser supports getUserMedia if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) { // Access the webcam stream navigator.mediaDevices.getUserMedia({ video: true }) .then(function(stream) { // Set the video source to the webcam stream video.srcObject = stream; }) .catch(function(error) { console.error('Error accessing the webcam:', error); }); } else { console.error('getUserMedia is not supported in this browser.'); } function login(){ window.open('https://007rohitsaini.github.io/aiml_final.io/') } var count = window.getElementById('data').innerHTML; if (count==10){ window.open('https://007rohitsaini.github.io/aiml_final.io/') }