Guest User

Untitled

a guest
May 26th, 2019
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. confirmCall(name).then((yesDoCall) => {
  2. if (yesDoCall) {
  3. // Get new TURN server credentials from Xirsys
  4. // Not Required but it is more reliable than peer-to-peer
  5. request(turnApiUrl, 'PUT', {
  6. 'headers': { 'tok': turnToken }
  7. }).then((response) => {
  8. rtcConfig.iceServers = [response];
  9. webRtcPhone.callUser(userToCall, {
  10. myStream: myAudioVideoStream
  11. });
  12. });
  13. }
  14. });
RAW Paste Data