Temasys / SkylinkJS

SkylinkJS Javascript WebRTC SDK
http://skylink.io/web
Other
275 stars 57 forks source link

getPeers not working #200

Closed 11111000000 closed 8 years ago

11111000000 commented 8 years ago
skylink
      .getPeers(true,
                ((error, success) =>
                 console.log('getPeers', error,success)))

, used after success skylink.init, never call it's callback and no any getPeersStateChange triggered. But peerJoined works as expected. So, I syncronize list of peers through counting of peerJoined, peerLeft events.

memoryonrepeat commented 8 years ago

Hi @11111000000 , note that getPeers only works when you're using a privileged alias key. Have you verified that the alias key you're using has privileged feature enabled ?

udit7590 commented 8 years ago

Getting the same issue. Yes I have verified that I am using privileged key and still getting the error

memoryonrepeat commented 8 years ago

Hi @udit7590, may I know your username and the name of the key you're using ?

udit7590 commented 8 years ago

@tienthanh8490 Username: uditvinsol, API key name: alias-Privileged

memoryonrepeat commented 8 years ago

Hi @udit7590 , I tested using your key and was able to get the list of other peers with getPeers().

Note that from the document , if you don't set the parameter showAll=true, getPeers() will only provide the list of unprivileged peers (autoIntroduce = isPrivileged = false). I also noticed that you haven't created any unprivileged alias key, so if you run getPeers() without any parameter you won't be able to get anything in your case.

Could you try with getPeers(true) and let me know the result ?

oooookk7 commented 8 years ago

Hi @11111000000 and @udit7590, hadn't heard from you for awhile on this issue, which I'll assume it's fine now on your end. Please feel free to open a support ticket here if this issue still persists again. I'm closing this ticket for now.