Browsers generally will not set `navigator.mediaDevices` unless you're using a secure connection (except for localhost). This is frustrating when testing apps that use these features as you then need to use self signed certs. I understand why, though.
Note, webRTC "over" http or https is not a thing. What is a thing is a page that is served over http or https initiating a webRTC connection, which goes over UDP and is peer to peer, unless there's relay servers, in which case it should still be over UDP.