TURN and STUN server issues step05

Issue #39 new
Łukasz Trojanowski created an issue

Hello Sam,

It seems that there is an error in var pcConfig

var pcConfig = {
  'iceServers': [{
    'urls': 'stun:stun.l.google.com:19302' // this should be 'url': ... not 'urls'
  }]
};

later the url of iceServers are checked in the requestTurn function. What I do not understand is why is the stun server never used? the requestTurn function only checks for urls starting with 'turn:(...)'

if (pcConfig.iceServers[i].url.substr(0, 5) === 'turn:') {

Nowhere else are the urls even accessed. Is there code missing from the code sample? This would explain why I can't get the code to work outside of my local network.

Comments (4)

  1. Sam Dutton repo owner

    Hi Lukasz

    This repo is no longer maintained, and I'm not really working on WebRTC projects now.

    A new version of the codelab is available at codelabs.developers.google.com/codelabs/webrtc-web/#0.

    Thanks!

    Sam

  2. Łukasz Trojanowski reporter

    Turns out I was actually already using that codelabs code, but it is mostly identical. Anyways sorry for bothering you, the first part of my issue is irrelevant for this codelab.

  3. Log in to comment