Update client

This commit is contained in:
Sergiu Toma 2021-01-29 11:27:56 +02:00
parent edede51721
commit bbc19ad9ec

View File

@ -56,7 +56,7 @@ class App extends Component {
super();
this.state = {
login: 'AIRWizard-adi',
login: 'lx-adi',
password: 'Safemobile123',
user: null,
hubStatus: 0, // 0 uninitialized | 1 connecting | 2 connected | 3 connection error
@ -68,8 +68,8 @@ class App extends Component {
// rtcPeerConnection: null,
stunUrl: 'stun:10.120.1.134:19302',
turnUrl: 'turn:10.120.1.134:19302',
turnUsername: 'safemobile',
turnCredential: 'Safemobile123'
turnUsername: 'sergiu',
turnCredential: 'test123'
};
}
@ -265,38 +265,6 @@ class App extends Component {
}
calculateIceServers = () => {
// const obj = {
// "iceServers": [
// {
// "urls":[this.state.stunUrl],
// "username":"safemobile",
// "credential":"Safemobile123"
// },
// {
// "urls":[this.state.turnUrl],
// "username":this.state.turnUsername,
// "credential":this.state.turnCredential
// }
// ],
// "iceTransportPolicy":"all",
// "iceCandidatePoolSize":"0"
// };
// const obj = {
// "iceServers": [
// {
// "urls": "stun:dev.linx.safemobile.com:19302",
// "username":"",
// "credential":""
// }
// ],
// };
// {
// "urls": "turn:dev.linx.safemobile.com:19302?transport=tcp",
// "username": "sergiu",
// "credential": "test123"
// },
const obj = {
"iceServers": [
{
@ -311,18 +279,7 @@ class App extends Component {
}
]
};
// const obj = {
// "iceServers": [
// {
// "urls":[this.state.turnUrl],
// "username":this.state.turnUsername,
// "credential":this.state.turnCredential
// }
// ],
// "iceTransportPolicy":"relay",
// "iceCandidatePoolSize":"3"
// };
console.log('obj-----------------------', obj);
console.log('calculateIceServers-----------------------', obj);
return obj;
}
@ -406,7 +363,7 @@ class App extends Component {
return (
<div className="App">
<h1>WebRTC Client 0.7</h1>
<h1>WebRTC Client 0.8</h1>
<br></br>
<h2><u>STUN and TURN servers</u></h2>