xirsys I need to use the stun and turn server in my system. I am using simplepeer.js .Any idea that where should i get credentials of both servers?
1 Answers
I do not have the idea about simplepeer.js but, I am using Xirsys for stun/turn server. Hope it may help you. For Xirsys credentials, signup and get your username, token. Create a domain, application, and room in Xirsys. and call the Xirsys for the ice credentials. It will be active for 30 seconds only so you need to get it just before it is needed. I am providing you the js code for it.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>// <![CDATA[
$(document).ready(function() {
$.get("https://service.xirsys.com/ice",
{
ident: "<username>",
secret: "<token>",
domain: "<domain>",
application: "<app name>",
room: "<room name>",
secure: 1
},
function(data, status) {
//alert("Data: " + data + "nnStatus: " + status);
console.log("Data: " );
console.log(data);
console.log("nnStatus: " + status);
$('#txtbox').html(JSON.stringify(data));
});
});
// ]]></script>
</head>
<body>
<p id="txtbox"></p>
</body>
</html>
Modify your code accordingly.
See Xirsys for more details.
Hope this may solve your problem to some extent.
Enjoy coding.

- 511
- 8
- 18