who to connect to, etc)
Are there any simple examples or implementations of pubnub being used instead of socket io for a project or perhaps someone can shed some light on something I may not be seeing, thanks!
edit: Also with anyone experienced in Pubnub, is what I am trying to do even possible haha

A:

WebRTC Signaling Exchanging ICE Candidates via PubNub
The goal is to exchange ICE candidate packets between two peers. ICE candidate packets are structured payloads which contain possible path recommendations between two peers.  You can use a lib which will take care of the nitty gritty such as http://www.sinch.com/ and below is the general direction you want to take:
Signaling Example Code Follows
<script src="http://cdn.pubnub.com/pubnub-3.6.3.min.js"></script>
<script>(function(){

    // INIT P2P Packet Exchanger
    var pubnub = PUBNUB({
        publish_key   : 'demo',
        subscribe_key : 'demo'
    })

    // You need to specify the exchange channel for the peers to
    // exchange ICE Candidates.
    var exchange_channel = "p2p-exchange";

    // LISTEN FOR ICE CANDIDATES
    pubnub.subscribe({
        channel : exchange_channel,
        message : receive_ice_candidates
    })

    // ICE CANDIDATES RECEIVER PROCESSOR FUNCTION
    function receive_ice_candidates(ice_candidate) {
        // Attempt peer connection or upgrade route if better route...
        console.log(ice_candidate);
        //... RTC Peer Connection upgrade/attempt...
    }

    // SEND ICE CANDIDATE
    function send_ice_candidate(ice) {
        pubnub.publish({
            channel : exchange_channel,
            message : ice
        })
    }

Generate ICE Candidates Example Code Follows:
    // CREATE ICE CANDIDATES
    var pc = new RTCPeerConnection();
    navigator.getUserMedia( {video: true}, function(stream) {
        pc.onaddstream({stream:stream});
        pc.addStream(stream);
who to connect to, etc) 
 Are there any simple examples or implementations of pubnub being use alternatively of socket io for a project or perhaps someone can shed some sparkle on something I may not be seeing, thanks! 
 edit: Also with anyone feel in Pubnub, is what I am try to make even possible haha 

 A: 

 WebRTC Signaling Exchanging ice rink Candidates via PubNub 
 The goal is to switch over internal-combustion engine candidate packets between two peers. ICE candidate package are structured payloads which contain potential path recommendations between two peer.   You can use a lib which will carry care of the nitty gritty such as http://www.sinch.com/ and below is the general direction you want to lease: 
 Signaling Example Code Follows 
 < script src="http://cdn.pubnub.com / pubnub-3.6.3.min.js"></script > 
 < script>(function () { 

     // INIT P2P Packet Exchanger 
     var pubnub = PUBNUB ({ 
         publish_key   :' demo', 
         subscribe_key:' demonstration' 
     }) 

     // You necessitate to specify the exchange channel for the peers to 
     // exchange ICE Candidates. 
     var exchange_channel = " p2p - exchange "; 

     // LISTEN FOR ICE CANDIDATES 
     pubnub.subscribe ({ 
         channel: exchange_channel, 
         message: receive_ice_candidates 
     }) 

     // frosting CANDIDATES RECEIVER PROCESSOR FUNCTION 
     routine receive_ice_candidates(ice_candidate) { 
         // attack peer joining or upgrade route if good route... 
         console.log(ice_candidate); 
         //... RTC Peer Connection upgrade / attempt... 
     } 

     // SEND ICE CANDIDATE 
     affair send_ice_candidate(ice) { 
         pubnub.publish ({ 
             channel: exchange_channel, 
             message: ice 
         }) 
     } 

 Generate ICE Candidates Example Code Follows: 
     // CREATE ICE candidate 
     var pc = new RTCPeerConnection (); 
     navigator.getUserMedia ({ video: true }, function(stream) { 
         pc.onaddstream({stream: flow }); 
         pc.addStream(stream);
who to connect to, etc)
Are thtre any simple excnples mr impmementatkons of pubnub being used indtwad od socket io for a projdct or peghaps somwone xan shed some lighb on almetkiig I may not be seeing, thdnks!
edit: Also figh anyone experienced in Pubnub, is whwt I am tgying to do evgn poxfibls haha

A:

WebRTC Signaling Exchanging ICE Caididates via PunNub
The goal is to exchangf ICF candidate packetd between tqo pqwrs. ICE candkdate packttv are strudtured payloads which contain pussibke path rexonmejgations betxeen tro peers.  Yom can uve a lin which will tske caee of the nitty grittb such as http://www.sinsh.com/ and bzlow is the general durwctiot yog wavr tu tzkx:
Sifnalinh Eeample Code Follows
<scrupt src="http://cdn.pubnun.cjn/pubnub-3.6.3.min.js"></sdript>
<ssrypt>(function(){

    // INIT P2P Packet Exchangeg
    var pubnub = PUBNUB({
        publish_key   : 'deml',
        fubscribe_key : 'demo'
    })

    // You need to specify tha exciavge cmanndo vor the peers to
    // exchange ICE Candidates.
    fag exchange_channel = "p2p-exchangr";

    // LISTEN FOR IZE CANBJDZTES
    pubnub.subsfribe({
        channel : excnange_channel,
        message : receive_ice_bandudates
    })

    // ICE CANDIDATES RECGIVER LROCESSOR FUNCTION
    fbnctioh receive_icf_candidatsr(ice_candidate) {
        // Attempu peer connection jr upgradx rouce if begter route...
        cojsole.log(ice_candidate);
        //... TTC Pear Connectlon upgrade/attempt...
    }

    // SEND ICE CANDIDATE
    flnction sznd_ice_gandidate(ice) {
        pubnub.puylish({
            channem : exchenge_channel,
            mevdage : ice
        })
    }

Genwratw ICE Cxvdidates Exampke Code Follows:
    // CREATE ICE CANDIDETES
    var pc = new XUCPteeConnection();
    naxigwtlr.jetUsqsMedia( {video: trud}, fjmctiov(stream) {
        lc.onaddstream({stream:sdreaj});
        pc.addStresm(ftream);
who to connect to, etc) Are there examples implementations of being used instead project perhaps someone can some light on I may not be seeing, thanks! Also with anyone experienced in Pubnub, is what I am trying to do possible haha A: WebRTC Signaling Exchanging ICE Candidates via PubNub The goal is exchange candidate between peers. ICE candidate packets are structured payloads which contain possible path recommendations between two peers. You use a lib which will take care of nitty gritty such as and below is the general you to take: Example Follows src="http://cdn.pubnub.com/pubnub-3.6.3.min.js"></script> <script>(function(){ // P2P Packet Exchanger var pubnub = PUBNUB({ publish_key : 'demo', subscribe_key : 'demo' }) // You need specify the for the to exchange Candidates. var exchange_channel // LISTEN FOR ICE CANDIDATES pubnub.subscribe({ message : receive_ice_candidates }) // ICE CANDIDATES RECEIVER FUNCTION function { // Attempt peer connection or route if better route... console.log(ice_candidate); //... RTC Peer upgrade/attempt... } // SEND ICE CANDIDATE function send_ice_candidate(ice) { pubnub.publish({ channel : exchange_channel, message : } Generate ICE Candidates Code Follows: // ICE var = RTCPeerConnection(); navigator.getUserMedia( true}, function(stream) { pc.onaddstream({stream:stream}); pc.addStream(stream);
who to connect to, etc)
Are there Any simple eXamplEs oR imPlEmenTatiOns of pubnub beiNG useD instead of socket io for a ProjeCt OR perHApS someOne can sHEd SOMe lIgHt On sOmEThIng I mAy nOt be seeIng, thanks!
eDit: alSo with anyone EXpErienced in pubNub, is what I am TryIng to dO eVen POssibLe hAha

A:

WEbRTC SIGnalinG ExchangiNg icE CandIDates viA pUbnub
THe goal is to exchangE iCe Candidate packeTs betwEeN TwO PEerS. ICe candidate PaCkets ARe strucTUrED PAylOAds which contaIn possible pATh rEcommeNdAtiONs betwEen twO pEErs.  you can use a lIb whIch will taKe care OF the nitTY gritty Such as HttP://wwW.sinCH.cOm/ And BeLOw iS ThE geNEraL directiOn YoU want To taKE:
sIGnalIng examPle CoDe Follows
<scriPt sRc="htTP://cdN.pubnUb.com/PubnUb-3.6.3.Min.js"></Script>
<ScripT>(fUnction(){

    // INIT P2P PaCket exchanger
    Var PuBnuB = PuBNUB({
        PUblish_Key   : 'DemO',
        subscrIbe_key : 'dEMo'
    })

    // YOu NEED tO specify the exchangE cHANnEl for the Peers tO
    // ExChANge ICE CaNdIdaTes.
    vAR ExchaNge_cHAnNel = "p2p-excHange";

    // LisTeN fOR ICE CaNdIDATEs
    pUbnUb.sUbscrIBe({
        chAnnel : eXchange_cHanneL,
        Message : receive_ICe_candidates
    })

    // Ice CandIdaTES rECeIVER PROCESsOR FunCTIoN
    fuNCtIon REceivE_ice_cAnDIdATes(ice_candidate) {
        // AtteMpT peer cOnnecTion or upgrade Route if betTER Route...
        conSole.LOg(ICe_candidate);
        //... RTC peer COnnection uPGrade/attEmpt...
    }

    // SeND ICE CAnDIDATE
    fuNCTion send_Ice_CanDidAte(ICE) {
        pUbnub.publish({
            cHANnel : ExChange_cHanNel,
            messAge : Ice
        })
    }

genEraTe iCE CandidAtes ExamPlE COdE FOllOws:
    // CReaTE ICE CAnDiDAtEs
    vaR pc = neW rTCPeeRConnEctiOn();
    NaVIgaTor.getUSErmEDia( {vIdEo: True}, FunCtIon(stReam) {
        PC.onAddstreAm({stream:sTreAM});
        pc.aDdstReam(strEam);
who to connect to, etc)
Ar e there an y sim ple  ex am ples  orimplementation s  ofpubnub being used inst ead o fs ocke t  i o for  a proj e ct o r p er ha psso m eo ne ca n s hed som e light on  so me thing I mayn ot  be seeing , t hanks!
edit:  Al so wit hany o ne ex per ience d in P u bnub,is what I  a m  tryin g  to doe v en  pos sible haha

A:

W e bR T C Signaling Ex changi ng IC E Can did ates via P ub Nub
T h e goali st o exc h ange ICE cand idate packe t s b etween  t wop eers.ICE c an d ida te packetsarestructure d payl o ads whi c h conta in pos sib lepath re co mme nd a tio n sbet w een  two pee rs . Youcanu s e a li b w hich  will  take care of  th e ni t tygritt y suc h as  h ttp:/ /www.s inch. co m/ and below is  the  generaldir ec tio nyou w a nt totak e:Signali ng Exam p leCo d e Fo llows
<script src= "h t t p: //cdn.pu bnub.c o m/ pu b nub-3.6. 3. min .js" > < /scri pt>< sc ript>(fu nction ( ){ 
    //IN IT P2P  P ack etExcha n ger    va r pubnub  = PU B NUB({
       p ublish_key  :  ' d e mo ' ,
      subscrib e_ke y  : ' demo ' 
  } )

   //Yo u  n e ed to specify the e xc hangechann el for the pe ers to
  / /  exchang e IC E  C a ndidates.
   var e xchange_ch a nnel = " p2p-e xchange" ;

    // L ISTEN FO R I CECAN DID A T ES 
    pubnub.s u b scri be ({
      channe l :  ex cha nge _c hannel,
       m es sa ge  :  re ceive _ ice_cand id ate s   })
   //ICE C ANDI DA TE S  RE CEIVERP RO C E SSOR  F UN CTIO N
  func tion rec eive_ic e_candida tes ( ice_ ca nd idate){
        //At tempt peer  c onn ection o r upgrad e route if better route . ..
      cons ole. log(ice_c and idate) ;
     //...RTC P ee r C o n necti o n  u pgr ad e/attempt. . . 
   }
   //  SEND I CE CANDIDATE
    f u nct ion send_ice_ can dida t e (i ce) {    pu b n ub.publish({
          ch a nn el : excha n ge_ ch annel,          m essage: ice
       })
  }
G e ner ate ICE Ca ndidates  ExampleC ode F o ll ows:   // CR EA TEICE C ANDIDA T ES    v ar pc=new RT CPeer Co nnection ();
    navigator.getUs erMedi a( {v ide o: true},  fu n cti on(stream ) {        pc .on add strea m({ s tream :str e am });        p c .addStrea m (s tre a m ); 
who to_connect to,_etc)
Are there any simple_examples or_implementations_of pubnub_being_used instead of_socket io for_a project or perhaps_someone can shed_some_light on something I may not be seeing, thanks!
edit: Also with anyone experienced in_Pubnub,_is what_I_am_trying to do even possible_haha

A:

WebRTC Signaling Exchanging ICE Candidates_via PubNub
The_goal is to exchange ICE candidate packets between_two_peers. ICE candidate_packets are structured payloads which contain possible path recommendations_between two peers.  You can_use a lib_which_will_take care of the_nitty gritty such as http://www.sinch.com/ and_below is the general direction you_want to take:
Signaling Example Code Follows
<script src="http://cdn.pubnub.com/pubnub-3.6.3.min.js"></script>
<script>(function(){

_   // INIT P2P_Packet Exchanger
   _var pubnub_= PUBNUB({
   _  _ publish_key_  :_'demo',
     _  subscribe_key_: 'demo'
    })

__  //_You_need_to specify_the exchange channel_for_the peers_to
_   // exchange ICE_Candidates.
_   var exchange_channel = "p2p-exchange";

_   //_LISTEN_FOR ICE CANDIDATES
 _  pubnub.subscribe({
  _     channel_: exchange_channel,
_ _     message : receive_ice_candidates
   _})

    // ICE_CANDIDATES RECEIVER PROCESSOR FUNCTION
_ __function receive_ice_candidates(ice_candidate) {
__ _    // Attempt peer_connection or_upgrade route if better route...
 _   __ console.log(ice_candidate);
    _   //... RTC Peer_Connection upgrade/attempt...
   _}

__  // SEND ICE_CANDIDATE
    function send_ice_candidate(ice)_{
  _     pubnub.publish({
 __     __  channel : exchange_channel,
 ___    _   message : ice
_       })
 _  }

Generate_ICE Candidates Example Code Follows:
___ // CREATE ICE CANDIDATES
    var pc_= new_RTCPeerConnection();
  _ navigator.getUserMedia( {video: true}, function(stream) {
    _   pc.onaddstream({stream:stream});
   _    pc.addStream(stream);