I'm working on a project that uses webrtc apis. Right now I have my iceServers configuration on the client side as a JavaScript object literal. Something like the following:
var iceServers = [{
{urls: 'mystun:mystun.google.com:portnumber'},
{urls: 'turn:the.ip.of.the.server', 'username': 'myusername', 'credentials': 'mycred'}
}];
My question has to do with these credentials being exposed to the client side. Whether they come from the server as json or they are hardcoded on the client side, they are exposed. I use these credentials to instantiate the RTCPeerConnection api as the API requires. Is there a way that I can keep these credentials hidden from the client side javascript? Thanks in advance!