Temasys / SkylinkJS

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

How can I force Turn server to test? #234

Closed jonasmedeiros closed 6 years ago

jonasmedeiros commented 8 years ago

I Have a client that say that he cant hear the voice, I have this problem several times, how could i force to check if it is turn server?

oooookk7 commented 8 years ago

Hi @gunsline2, you can check if the forceTURN flag is enabled in the init() method. Do make sure that your Application Key has "TURN" set to "ON" (the field is not toggable now).

Additionally, you can check in chrome://webrtc-internals for Conn-... (the active one is in bold) and check if the googLocalCandidateType and the googRemoteCandidateType is relay (TURN).

For Firefox, you can go to about:webrtc and check if the Nominated row has both relayed in both the "Local Candidate" and "Remote Candidate" fields.

oooookk7 commented 8 years ago

And additionally, what exact issues is he facing and the environment is he on?

jonasmedeiros commented 8 years ago

Hi, The stream is getting black, When I use simplewebrtc and xirsys turn server have the same problem, sometimes in 4 people at same room 2 can speak and the other have problem, as I have log fail on that configuration.

jonasmedeiros commented 8 years ago

Always we have 1 relay connection it stop work.

oooookk7 commented 8 years ago

@gunsline2 hmm.. turn (relay) connections are supposed to help with connections behind a firewall. some of the connections are dependant on one's network capabilities, since video would demand some network. perhaps it might help us if we send us a demo app link and we can diagnose if it's related to any client or (our SDK) issue

oooookk7 commented 8 years ago

additionally, is it possible for you to share the logs so we can see the current ice connection states etc.

jonasmedeiros commented 8 years ago

Hi, yes I made an example, please check, now even my skylink demo is not working

Simple Skylink demo https://github.com/gunsline2/simplewebrtctest-/tree/master/src/app/test_skylink

Skylink at our code https://github.com/gunsline2/simplewebrtctest-/tree/master/src/app/skylink

Simplewebrtc with xirsys - this is working but have the same error, I took off the js of simplewebrtc I thought would be that what was wrong

The client when get into the room they have firewall, so they access using relay iceconnection

First question is Why the simple example on skylink is not working?

jonasmedeiros commented 8 years ago

The simplewertc with xirsys has the error of turn as well so I think must be an error on my code, if you can help with skylink part would be perfect and the client will choose to work with you at long term.

jonasmedeiros commented 8 years ago

I added to heroku please send to me your email so I can send to you the link user and password to get at it.

jonasmedeiros commented 8 years ago

I added skylink to heroku https (ssl) and it works, I think must be at my localhost is not, so just send the email so I can send to you and get to code review issue and turn issue.

oooookk7 commented 8 years ago

Hi @gunsline2, my email is leticia.choo@temasys.com.sg.

jonasmedeiros commented 8 years ago

@letchoo Sent the email to you.

oooookk7 commented 8 years ago

Hi @gunsline2, thanks. We will look into it.

oooookk7 commented 8 years ago

Hi @gunsline2,

Do you mind setting forceTURN: true in the init() settings for both the /test-skylink and /skylink demo? And also setting skylink.setLogLevel(4) for the /test-skylink demo?

Thanks!

jonasmedeiros commented 8 years ago

Hi @letchoo just updated the code and server.

oooookk7 commented 8 years ago

Hi @gunsline2, thanks. sorry to ask again. Do you mind using skylink.complete.js for now instead of skylink.complete.min.js for both test cases? The production ready version strips out the logs.

Thanks again!

jonasmedeiros commented 8 years ago

Just finish update to complete

oooookk7 commented 8 years ago

Hi @gunsline2, thanks. We are looking into it.

oooookk7 commented 8 years ago

Hi @gunsline2, for the /test-skylink I think you have muted the other peer's video.

skylink.on('peerJoined', function(peerId, peerInfo, isSelf) {
    if(isSelf) return; // We already have a video element for our video and don't need to create a new one.
    var vid = document.createElement('video');
    vid.autoplay = true;
    // comment out here //vid.muted = true; // Added to avoid feedback when testing locally
    vid.id = peerId;
    document.body.appendChild(vid);
  });
jonasmedeiros commented 8 years ago

@letchoo Thanks I check that, so the rest of it is okay?

oooookk7 commented 8 years ago

Hi @gunsline2, the demo for /skylink is fine. We tested instead with /skylink demo and could hear the audio.

As for the TURN connectivity issues, we do not experience the same issues, and your code written is fine. However, this is still a problem and we would like to help to get to the bottom of it.

Do you experience any problems with your app when debugging in your own dev (local only) environment, or is it only experienced on site with the customer using it?

If possible, just for a last sanity check, if you could test https://getaroom.io and see if the same issues could be reproduced.

Additionally, what is the version of the plugin are you using? This can be checked in the console with the following (we tested with version 0.8.870):

AdapterJS.WebRTCPlugin.plugin.VERSION

Thanks.

jonasmedeiros commented 8 years ago

Hi @letchoo, Okay we are going to test on getroom.io, did not have the same error locally that happen only with the client under a firewall connection.

One error that we have always that we tested, if one user is at safari browser and have a call to another safari browser the connection between them just drop after a few minutes, this is quite easy to test, I saw that on my tests too, and for internet explorer did not have the same error, at that browser is perfect.

oooookk7 commented 8 years ago

Hi @gunsline2,

Alright. We will investigate further.

magmaerupts commented 8 years ago

Hey Jonas ( @gunsline2 ),

Just to double check if we are understanding the second issue correctly - are you saying that when you tested https://getaroom.io from Safari to Safari, you experienced the connection drop?

If so, this would be plugin related.So, I would suggest creating a support enquiry here so we can help you troubleshoot this with the following details :

  1. MacOS versions of both peers
  2. Safari version of both peers
  3. Plugin version used and plugin tier (Free / trial / commercial )