Created
May 15, 2019 23:44
-
-
Save ajb413/0a413563666c75d119d930cac7cd43e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
confirmCall(name).then((yesDoCall) => { | |
if (yesDoCall) { | |
// Get new TURN server credentials from Xirsys | |
// Not Required but it is more reliable than peer-to-peer | |
request(turnApiUrl, 'PUT', { | |
'headers': { 'tok': turnToken } | |
}).then((response) => { | |
rtcConfig.iceServers = [response]; | |
webRtcPhone.callUser(userToCall, { | |
myStream: myAudioVideoStream | |
}); | |
}); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
confirmCall(name).then((yesDoCall) => { | |
if (yesDoCall) { | |
webRtcPhone.callUser(userToCall, { | |
myStream: myAudioVideoStream | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment