With multiple webcams connected
Even if I write this code, Debug.Log() will display the correct device name, but the texture displayed will be the texture of devices [0].
This is something that has been recently fixed in our trunk codebase (the WebGL WebCam backend was rewritten). Look out for a new updated point release on 2019.4 or newer, and check out 2021.1 alpha release channel, which is where it will land first.
If this is the case, the default camera will be selected.
Therefore, even if you switch devices on the Unity side, it will remain the default device forever.
at least
If you are seeing a line “navigator.getMedia”, that is still part of the old code, so looks like we have not yet had a release go out with the new implementation.