Spaces:
Sleeping
Sleeping
async function access_webcam_modified(): Promise<void> { | |
try { | |
const constraints = { | |
video: { facingMode: "environment" }, // Request the back camera | |
audio: include_audio | |
}; | |
const stream = await navigator.mediaDevices.getUserMedia(constraints); | |
video_source.srcObject = stream; | |
video_source.play(); | |
// Other setup code as needed | |
} catch (err) { | |
// Error handling | |
} | |
} | |