The helper method VideTexture.CreateFromWebCam takes in a MediaTrackConstraints object that lets you specify requirements for the video stream that is picked. It however doesn’t give you a way to change those constraints later (which you can usually do through MediaStreamTrack.applyConstraints())
Some of the constraints are ones that you would ideally be able to modify during the lifetime of the VideoTexture. Some examples are:
- Turning on/off the torch/flashlight using the torch constraint
- Turning on/off autofocus using the focusMode constraint
- Changing the focus using the focusDistance constraint
It would be very handy for BabylonJS to expose some way to query the MediaStreamTrack used internally by VideoTexture.CreateFromWebCam in order to apply changes at runtime.