{"action":"created","comment":{"url":"https://api.github.com/repos/kaazing/webrtc/pulls/comments/85706008","pull_request_review_id":6405396,"id":85706008,"diff_hunk":"@@ -247,59 +258,44 @@ function handleVideo(myStream) {\n     //when a remote user adds stream to the peer connection, we display it\n     yourConn.ontrack = function(e) {\n         console.log(\"Entering ontrack\", e);\n-        \n-        callBtn.style.display='none';\n-        callToUsernameInput.style.display='none';\n-        hangUpBtn.style.display='inline';\n-        overlay.style.visibility='visible';\n-        overlay.innerText='Connected to '+connectedUser;\n-\n-        if (true == answerReceived) { \n-\t   if ( e.track.kind===\"video\") {\n-\t\tconsole.log(\"Adding video stream\");\n-       \t\tremoteVideo.srcObject = e.streams[0];\n-\t   }\n-\t   console.log(\"Exiting ontrack\"); \n-\t   return; \n-\t}\n-\n-        if (connectedUser !== undefined && connectedUser.length > 0 )  { \n-\t   if ( e.track.kind===\"video\") {\n+        showInCall();\n+        if ( e.track.kind===\"video\") {\n+            console.log(\"Adding video stream\");\n                 remoteVideo.srcObject = e.streams[0];\n-                yourConn.createOffer().then(function(offer) {\n-                        console.log(\"Creating offer : \", offer);\n-                        send({\n-                            type: \"offer\",\n-                            offer: offer\n-                        });\n-\n-                        yourConn.setLocalDescription(offer);\n-                        \n-\n-                    }).catch(function(error) {\n-                        console.log(\"Error when creating an offer\", error);\n-                    });\n-       } \n-\t} \n+        }\n         console.log(\"Exiting ontrack\");\n     };\n \n     yourConn.addStream(stream);\n-    //stream.getTracks().forEach(track => yourConn.addTrack(track, stream));\n+\n     // Setup ice handling\n     yourConn.onicecandidate = function(event) {\n         console.log(\"Entering onicecandidate\", event);\n+        \n         if (event.candidate) {\n-            // comment in if you want to force relay, this demo currently requires\n-            if (event.candidate.candidate.indexOf(\"relay\") > 0) {\n+            if (event.candidate.candidate.indexOf(\"host\") < 0) {\n                 send({\n                     type: \"candidate\",\n                     candidate: new RTCIceCandidate(event.candidate)\n                 });\n             }\n         }\n+        \n         console.log(\"Exiting onicecandidate\");\n     };\n+    \n+    yourConn.oniceconnectionstatechange = function(event) {\n+            console.log(\"Ice Connection State Change with event: \", event);\n+            console.log(\"Ice Connection State is now: \", yourConn.iceConnectionState);\n+            console.log(\"Ice Gathering State is now: \", yourConn.iceGatheringState);\n+    }\n+    \n+    /*yourConn.onnegotiationneeded = function () {","path":"gateway/webrtc/client.js","position":177,"original_position":177,"commit_id":"b25fd85759d54959e17f7d0de7e62d9542edf421","original_commit_id":"b25fd85759d54959e17f7d0de7e62d9542edf421","user":{"login":"DoruM","id":3726034,"avatar_url":"https://avatars.githubusercontent.com/u/3726034?v=3","gravatar_id":"","url":"https://api.github.com/users/DoruM","html_url":"https://github.com/DoruM","followers_url":"https://api.github.com/users/DoruM/followers","following_url":"https://api.github.com/users/DoruM/following{/other_user}","gists_url":"https://api.github.com/users/DoruM/gists{/gist_id}","starred_url":"https://api.github.com/users/DoruM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoruM/subscriptions","organizations_url":"https://api.github.com/users/DoruM/orgs","repos_url":"https://api.github.com/users/DoruM/repos","events_url":"https://api.github.com/users/DoruM/events{/privacy}","received_events_url":"https://api.github.com/users/DoruM/received_events","type":"User","site_admin":false},"body":"It was needed while debugging. It will be removed.","created_at":"2016-10-31T09:32:06Z","updated_at":"2016-10-31T09:32:06Z","html_url":"https://github.com/kaazing/webrtc/pull/25#discussion_r85706008","pull_request_url":"https://api.github.com/repos/kaazing/webrtc/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/comments/85706008"},"html":{"href":"https://github.com/kaazing/webrtc/pull/25#discussion_r85706008"},"pull_request":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/kaazing/webrtc/pulls/25","id":90836220,"html_url":"https://github.com/kaazing/webrtc/pull/25","diff_url":"https://github.com/kaazing/webrtc/pull/25.diff","patch_url":"https://github.com/kaazing/webrtc/pull/25.patch","issue_url":"https://api.github.com/repos/kaazing/webrtc/issues/25","number":25,"state":"open","locked":false,"title":"Fix for WebRTC demo appears to not be going through turn proxy","user":{"login":"DoruM","id":3726034,"avatar_url":"https://avatars.githubusercontent.com/u/3726034?v=3","gravatar_id":"","url":"https://api.github.com/users/DoruM","html_url":"https://github.com/DoruM","followers_url":"https://api.github.com/users/DoruM/followers","following_url":"https://api.github.com/users/DoruM/following{/other_user}","gists_url":"https://api.github.com/users/DoruM/gists{/gist_id}","starred_url":"https://api.github.com/users/DoruM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoruM/subscriptions","organizations_url":"https://api.github.com/users/DoruM/orgs","repos_url":"https://api.github.com/users/DoruM/repos","events_url":"https://api.github.com/users/DoruM/events{/privacy}","received_events_url":"https://api.github.com/users/DoruM/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-25T15:49:04Z","updated_at":"2016-10-31T09:32:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b36b4ba0d8496bede3df3275fd664196713833dc","assignee":{"login":"dpwspoon","id":2014623,"avatar_url":"https://avatars.githubusercontent.com/u/2014623?v=3","gravatar_id":"","url":"https://api.github.com/users/dpwspoon","html_url":"https://github.com/dpwspoon","followers_url":"https://api.github.com/users/dpwspoon/followers","following_url":"https://api.github.com/users/dpwspoon/following{/other_user}","gists_url":"https://api.github.com/users/dpwspoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dpwspoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpwspoon/subscriptions","organizations_url":"https://api.github.com/users/dpwspoon/orgs","repos_url":"https://api.github.com/users/dpwspoon/repos","events_url":"https://api.github.com/users/dpwspoon/events{/privacy}","received_events_url":"https://api.github.com/users/dpwspoon/received_events","type":"User","site_admin":false},"assignees":[{"login":"dpwspoon","id":2014623,"avatar_url":"https://avatars.githubusercontent.com/u/2014623?v=3","gravatar_id":"","url":"https://api.github.com/users/dpwspoon","html_url":"https://github.com/dpwspoon","followers_url":"https://api.github.com/users/dpwspoon/followers","following_url":"https://api.github.com/users/dpwspoon/following{/other_user}","gists_url":"https://api.github.com/users/dpwspoon/gists{/gist_id}","starred_url":"https://api.github.com/users/dpwspoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpwspoon/subscriptions","organizations_url":"https://api.github.com/users/dpwspoon/orgs","repos_url":"https://api.github.com/users/dpwspoon/repos","events_url":"https://api.github.com/users/dpwspoon/events{/privacy}","received_events_url":"https://api.github.com/users/dpwspoon/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kaazing/webrtc/pulls/25/commits","review_comments_url":"https://api.github.com/repos/kaazing/webrtc/pulls/25/comments","review_comment_url":"https://api.github.com/repos/kaazing/webrtc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaazing/webrtc/issues/25/comments","statuses_url":"https://api.github.com/repos/kaazing/webrtc/statuses/b25fd85759d54959e17f7d0de7e62d9542edf421","head":{"label":"DoruM:tickets-827-not-via-coturn","ref":"tickets-827-not-via-coturn","sha":"b25fd85759d54959e17f7d0de7e62d9542edf421","user":{"login":"DoruM","id":3726034,"avatar_url":"https://avatars.githubusercontent.com/u/3726034?v=3","gravatar_id":"","url":"https://api.github.com/users/DoruM","html_url":"https://github.com/DoruM","followers_url":"https://api.github.com/users/DoruM/followers","following_url":"https://api.github.com/users/DoruM/following{/other_user}","gists_url":"https://api.github.com/users/DoruM/gists{/gist_id}","starred_url":"https://api.github.com/users/DoruM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoruM/subscriptions","organizations_url":"https://api.github.com/users/DoruM/orgs","repos_url":"https://api.github.com/users/DoruM/repos","events_url":"https://api.github.com/users/DoruM/events{/privacy}","received_events_url":"https://api.github.com/users/DoruM/received_events","type":"User","site_admin":false},"repo":{"id":69347110,"name":"webrtc","full_name":"DoruM/webrtc","owner":{"login":"DoruM","id":3726034,"avatar_url":"https://avatars.githubusercontent.com/u/3726034?v=3","gravatar_id":"","url":"https://api.github.com/users/DoruM","html_url":"https://github.com/DoruM","followers_url":"https://api.github.com/users/DoruM/followers","following_url":"https://api.github.com/users/DoruM/following{/other_user}","gists_url":"https://api.github.com/users/DoruM/gists{/gist_id}","starred_url":"https://api.github.com/users/DoruM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DoruM/subscriptions","organizations_url":"https://api.github.com/users/DoruM/orgs","repos_url":"https://api.github.com/users/DoruM/repos","events_url":"https://api.github.com/users/DoruM/events{/privacy}","received_events_url":"https://api.github.com/users/DoruM/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DoruM/webrtc","description":null,"fork":true,"url":"https://api.github.com/repos/DoruM/webrtc","forks_url":"https://api.github.com/repos/DoruM/webrtc/forks","keys_url":"https://api.github.com/repos/DoruM/webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DoruM/webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DoruM/webrtc/teams","hooks_url":"https://api.github.com/repos/DoruM/webrtc/hooks","issue_events_url":"https://api.github.com/repos/DoruM/webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/DoruM/webrtc/events","assignees_url":"https://api.github.com/repos/DoruM/webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/DoruM/webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/DoruM/webrtc/tags","blobs_url":"https://api.github.com/repos/DoruM/webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DoruM/webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DoruM/webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/DoruM/webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DoruM/webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/DoruM/webrtc/languages","stargazers_url":"https://api.github.com/repos/DoruM/webrtc/stargazers","contributors_url":"https://api.github.com/repos/DoruM/webrtc/contributors","subscribers_url":"https://api.github.com/repos/DoruM/webrtc/subscribers","subscription_url":"https://api.github.com/repos/DoruM/webrtc/subscription","commits_url":"https://api.github.com/repos/DoruM/webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/DoruM/webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/DoruM/webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/DoruM/webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/DoruM/webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/DoruM/webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DoruM/webrtc/merges","archive_url":"https://api.github.com/repos/DoruM/webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DoruM/webrtc/downloads","issues_url":"https://api.github.com/repos/DoruM/webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/DoruM/webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/DoruM/webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/DoruM/webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DoruM/webrtc/labels{/name}","releases_url":"https://api.github.com/repos/DoruM/webrtc/releases{/id}","deployments_url":"https://api.github.com/repos/DoruM/webrtc/deployments","created_at":"2016-09-27T10:51:59Z","updated_at":"2016-09-27T10:52:00Z","pushed_at":"2016-10-28T11:39:38Z","git_url":"git://github.com/DoruM/webrtc.git","ssh_url":"git@github.com:DoruM/webrtc.git","clone_url":"https://github.com/DoruM/webrtc.git","svn_url":"https://github.com/DoruM/webrtc","homepage":null,"size":258,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"kaazing:develop","ref":"develop","sha":"5f4eacda43c970bb1726d174fcfdd7c8cf4f7e6d","user":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"repo":{"id":65501727,"name":"webrtc","full_name":"kaazing/webrtc","owner":{"login":"kaazing","id":1056680,"avatar_url":"https://avatars.githubusercontent.com/u/1056680?v=3","gravatar_id":"","url":"https://api.github.com/users/kaazing","html_url":"https://github.com/kaazing","followers_url":"https://api.github.com/users/kaazing/followers","following_url":"https://api.github.com/users/kaazing/following{/other_user}","gists_url":"https://api.github.com/users/kaazing/gists{/gist_id}","starred_url":"https://api.github.com/users/kaazing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaazing/subscriptions","organizations_url":"https://api.github.com/users/kaazing/orgs","repos_url":"https://api.github.com/users/kaazing/repos","events_url":"https://api.github.com/users/kaazing/events{/privacy}","received_events_url":"https://api.github.com/users/kaazing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaazing/webrtc","description":null,"fork":false,"url":"https://api.github.com/repos/kaazing/webrtc","forks_url":"https://api.github.com/repos/kaazing/webrtc/forks","keys_url":"https://api.github.com/repos/kaazing/webrtc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaazing/webrtc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaazing/webrtc/teams","hooks_url":"https://api.github.com/repos/kaazing/webrtc/hooks","issue_events_url":"https://api.github.com/repos/kaazing/webrtc/issues/events{/number}","events_url":"https://api.github.com/repos/kaazing/webrtc/events","assignees_url":"https://api.github.com/repos/kaazing/webrtc/assignees{/user}","branches_url":"https://api.github.com/repos/kaazing/webrtc/branches{/branch}","tags_url":"https://api.github.com/repos/kaazing/webrtc/tags","blobs_url":"https://api.github.com/repos/kaazing/webrtc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaazing/webrtc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaazing/webrtc/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaazing/webrtc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaazing/webrtc/statuses/{sha}","languages_url":"https://api.github.com/repos/kaazing/webrtc/languages","stargazers_url":"https://api.github.com/repos/kaazing/webrtc/stargazers","contributors_url":"https://api.github.com/repos/kaazing/webrtc/contributors","subscribers_url":"https://api.github.com/repos/kaazing/webrtc/subscribers","subscription_url":"https://api.github.com/repos/kaazing/webrtc/subscription","commits_url":"https://api.github.com/repos/kaazing/webrtc/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaazing/webrtc/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaazing/webrtc/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaazing/webrtc/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaazing/webrtc/contents/{+path}","compare_url":"https://api.github.com/repos/kaazing/webrtc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaazing/webrtc/merges","archive_url":"https://api.github.com/repos/kaazing/webrtc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaazing/webrtc/downloads","issues_url":"https://api.github.com/repos/kaazing/webrtc/issues{/number}","pulls_url":"https://api.github.com/repos/kaazing/webrtc/pulls{/number}","milestones_url":"https://api.github.com/repos/kaazing/webrtc/milestones{/number}","notifications_url":"https://api.github.com/repos/kaazing/webrtc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaazing/webrtc/labels{/name}","releases_url":"https://api.github.com/repos/kaazing/webrtc/releases{/id}","deployments_url":"https://api.github.com/repos/kaazing/webrtc/deployments","created_at":"2016-08-11T21:09:33Z","updated_at":"2016-10-28T11:53:39Z","pushed_at":"2016-10-28T11:53:38Z","git_url":"git://github.com/kaazing/webrtc.git","ssh_url":"git@github.com:kaazing/webrtc.git","clone_url":"https://github.com/kaazing/webrtc.git","svn_url":"https://github.com/kaazing/webrtc","homepage":null,"size":254,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":2,"forks":6,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/25"},"html":{"href":"https://github.com/kaazing/webrtc/pull/25"},"issue":{"href":"https://api.github.com/repos/kaazing/webrtc/issues/25"},"comments":{"href":"https://api.github.com/repos/kaazing/webrtc/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaazing/webrtc/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/kaazing/webrtc/statuses/b25fd85759d54959e17f7d0de7e62d9542edf421"}}}}
{"actor":{"display_login":"DoruM"}}