You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
varPeer=require('simple-peer')varwrtc=require('wrtc')// node-webrtc, werift-webrtc ???varpeer1=newPeer({initiator: true,wrtc: wrtc})varpeer2=newPeer({wrtc: wrtc})peer1.on('signal',data=>{// when peer1 has signaling data, give it to peer2 somehowpeer2.signal(data)})peer2.on('signal',data=>{// when peer2 has signaling data, give it to peer1 somehowpeer1.signal(data)})peer1.on('connect',()=>{// wait for 'connect' event before using the data channelpeer1.send('hey peer2, how is it going?')})peer2.on('data',data=>{// got a data channel messageconsole.log('got a message from peer1: '+data)})
`
https://github.com/feross/simple-peer
The text was updated successfully, but these errors were encountered: