The getUserMedia() method has added support for pan, tilt & zoom properties as input constraints. This means that it is now possible to pan, tilt or zoom the camera using Javascript.
const stream = await navigator.mediaDevices.getUserMedia({
video: {
pan: true,
tilt: true,
zoom: true
},
audio: true
});
This feature can be used by media applications to improve the user experience. For example, a web application can use <input type="range"> to show a range slider to the user — whose current value can be set as the zoom of the camera.
Comments