I\'m working on a project with MVC ASP.Net 4 HTML5 (default browser is google-chrome v29.0.1547.57) I can interact with these tools and take photographs but only with front
In Chrome on my Samsung S8 I can use "facingMode"="environment" to take video from the 'rear camera'. The default seems to be "user" (the 'front' camera)
in TypeScript:
const video = document.getElementById("video");
const constraints = {
advanced: [{
facingMode: "environment"
}]
};
navigator.mediaDevices
.getUserMedia({
video: constraints
})
.then((stream) => {
video.src = window.URL.createObjectURL(stream);
video.play();
});
ref: MediaTrackConstraints/facingMode