Alexandre more or less touches on this, but there are quite many reasons why you might want to ensure that the device/stream that you are acquiring from getUserMedia is from a legitimate or built-in capture device rather than a fake device.
Use cases:
1. In general, ensuring the person on the other end of the camera and not a replay video
2. #1 but ensuring the person on the other end of the line isn't a fake face being overridden in realtime a la "deep fakes"
4. Live webcam interviews / verification where you want to be sure the feed on the other end is coming from a real camera
5. Wanting to ensure my security/monitoring camera that uses webrtc to broadcast can't be overridden.
6. ...etc
Am I correct in paraphrasing your response as "this is next to impossible because anything is possible when a user has root privs on their device and they can change anything in client side code, given enough motivation and know-how" ?
@Justin, I agree, in spirit, to the above. I see that you are a founder/tech lead so I am interested in your insight/perspective on the matter of the argument that "a sufficiently skilled attacker/programmer can hack the client to do anything they want" vs. protecting users and app ecosystems from fraud and exploits derived via the indistinguishability of native cam feeds and "fake" cam feeds.
Some ideas (if we were trying to brainstorm how this could be fixed...):
- Forgive my naivety on this front, but aren't there deeper OS-level properties/APIs that we can get at to better understand that a stream is tied to an actual piece of hardware?
- A registry and validation of hardware cams.
- Otherwise requiring some sort of deeper level of opt-in to be able to serve or "lock down" a hardware camera's signature.
- exposing more information about the video source, thus making it require more effort to spoof a real camera (i.e. currently the only thing webdevs can use is the "label" property and blacklisting/whitelisting
Thanks
Rao