For access to the mic and camera, that's basically what it does already: prompt for permission.
So what you're really asking for is "can the web app know my non-NATed IP address if I'm behind a NAT and my non-VPN IP address if I'm behind certain kinds of VPNs"?