Skip to content

Commit

Permalink
Merge pull request #525 from fippo/more-candidate-gathering-fixes
Browse files Browse the repository at this point in the history
candidate gathering demo: use urls everywhere
  • Loading branch information
KaptenJansson committed Jun 13, 2015
2 parents 302f9d0 + 789f01f commit 932c1eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/content/peerconnection/trickle-ice/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC
<h2>ICE servers</h2>

<select id="servers" size="4">
<option value="{&quot;url&quot;:&quot;stun:stun.l.google.com:19302&quot;}" ondblclick="selectServer(event);">stun:stun.l.google.com:19302</option>
<option value="{&quot;urls&quot;:[&quot;stun:stun.l.google.com:19302&quot;]}" ondblclick="selectServer(event);">stun:stun.l.google.com:19302</option>
</select>

<div>
Expand Down
6 changes: 3 additions & 3 deletions src/content/peerconnection/trickle-ice/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var candidates;
function selectServer(event) {
var option = event.target;
var value = JSON.parse(option.value);
urlInput.value = value.url;
urlInput.value = value.urls[0];
usernameInput.value = value.username || '';
passwordInput.value = value.credential || '';
}
Expand Down Expand Up @@ -179,8 +179,8 @@ function getFinalResult() {
//
// This only works for TURN/UDP since we do not get
// srflx candidates from TURN/TCP.
if (server.url.indexOf('turn:') === 0 &&
server.url.indexOf('?transport=tcp') === -1) {
if (server.urls[0].indexOf('turn:') === 0 &&
server.urls[0].indexOf('?transport=tcp') === -1) {
if (types.indexOf('relay') === -1) {
if (types.indexOf('srflx') > -1) {
// a binding response but no relay candidate suggests auth failure.
Expand Down

0 comments on commit 932c1eb

Please sign in to comment.