webrtc - where exactly the iceCandidate generate in AppRtcDemo? -


i working on webrtc peer peer calling , running apprtcdemo available on webrtc site . have gone through code , stuck on few points :

1 : when enter url hit server , got response like :

response return server{"meta_viewport":"","pc_constraints":"{\"optional\": [{\"googimprovedwifibwe\": true}]}","opusfec":"true","include_vr_js":"","vsbr":"","audio_receive_codec":"opus\/48000","arbr":"","vrbr":"","vsibr":"","token":"ahrlwroqceuffbws4dljrahxtwho2ldeh_94m_ziprkk7aih3naisffscjb_opz2lwc9xveweqrjkrwqaetsk5sxdjepoc3jp8uqxke23qnsanqobwshom4","initiator":1,"ssr":"","room_key":"95505311","pc_config":"{\"iceservers\": [{\"urls\": \"stun:stun.l.google.com:19302\"}]}","stereo":"false","audio_send_codec":"","turn_url":"https:\/\/computeengineondemand.appspot.com\/turn?username=77294535&key=4080218913","me":"77294535","room_link":"https:\/\/apprtc.appspot.com\/?r=95505311&t=json","error_messages":[],"offer_constraints":"{\"optional\": [], \"mandatory\": {}}","asbr":"","media_constraints":"{\"audio\": true, \"video\": true}"} 

here , want know creating iceserver ? on server or there code inside channel.html file.

is there way generate iceserver on application without server ? or iceserver our stun/turn url sent server ?

i have few question on channel.html :

how channel.html file helping demo run ? have gone through , calling onopen() , calling gaeclient class method .

thanks,

whichever ice server going used passed through rtcpeerconnection constructor when constructed(the object called pc apprtc example). can see servers looking @ pcconfig object.

once connection created(it not done until call starts in example), localdescription(a rtcsessiondescription object) set. once set, webrtc api start automatically gathering icecandidates against ice servers first introduced when peer connection created. once new candidate created, onicecandidate event fired(you can see function used transfer candidates if @ callback after pc object created).

so general steps follows:

  1. set iceservers want gather candidates against when create rtcppeerconnection object
  2. set localdescription local rtcsessiondescription object create(usually created via success callback set in createoffer or createanswer functions peerconnection).
  3. it start gathering candidates automatically against servers set when peerconnection constructed , each candidate onicecandidate event fired.

now, apprtc demo page, uses open stun server stun:stun.l.google.com:19302 , array of closed turn servers(that hosted on google's cloud) dynamic credentials gathered @ page load.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -