vivek1794 / webrtc-android-codelab

An attempt to provide a codelab for Webrtc in Android - Similar to codelab for web at https://codelabs.developers.google.com/codelabs/webrtc-web/
MIT License
238 stars 124 forks source link

Error in MainActivity --> getIceServers() #20

Open Vivektilva opened 6 years ago

Vivektilva commented 6 years ago

I am getting error in MainActivity.java --> getIceServers() --> for (IceServer iceServer : iceServers)

: java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference

For this i think i need to change para in TurnServer.java interface , in this interface , request url is there and for that i signed up in xirsys to get new values of param from my account.

from Xirsys account i got detail : ident,secret,channel,secure.

what should i pass in : domain,application,room?? @vivek1794

vickyzare567 commented 6 years ago

Hello vivek Do you solved the issue yet .. I am also stuck on the same problem

Vivektilva commented 6 years ago

ya instead of using API call , use static server detail.

vickyzare567 commented 6 years ago

Can you please explain in some details Static server means which server .. On that we are using socket implementation ?

Vivektilva commented 6 years ago

when you register your acc for stun and turn server( on xirsys) they will provide detail of API and also of static server detail .

vickyzare567 commented 6 years ago

I got the details of stun and turn but can please tell me how to use it in TurnServer.java interface. I have putted the details of api in this .

Vivektilva commented 6 years ago

no need to use Turnserver.java if u want to use static server detail, in xirsys where you are getting api detail in same page you will get static server detail, so instead of making API request to get list ,use those static server and put them in list .

vickyzare567 commented 6 years ago

Ok Thanks Vivek. I got it I just need to add the static servers to the list iceServers. Am I Right.. ?

vickyzare567 commented 6 years ago

But I have one Confusion. Should i need to put both the url's of stun and Turn or only turn ..?

Vivektilva commented 6 years ago

yes right just need to add static server to the list iceServers , actually it will work with Turn server but in list put url of both 1st stun server and after that turn servers.