These are chat archives for andyet/SimpleWebRTC

2nd
Oct 2017
The Karaoke Research Council
@karaokeresearch
Oct 02 2017 00:50
Hi, love this software. I'm assuming:
webrtc.on('channelMessage', function (peer, label, data)
…is what's listening when I execute::
webrtc.sendToAll("mymessage", "iLoveSimpleWebRTC")
…but it never seems to fire. When I turn on debug, I can see message incoming after it's been sent, but I'm not sure how to handle it. Any advice would be appreciated.
StudioInteractive
@StudioInteractive
Oct 02 2017 08:14
@karaokeresearch , The right way peer.sendDirectly('myroom', 'Ping',{mydata}); and on the other side listen to webrtc.on('channelMessage', function (peer, label, data){ // We only want to act on data received from the myroom channel
if (label !== 'myroom') {
return;
} if (data.type == 'Ping') {
peer.sendDirectly('myroom', 'Pong', {mydata})
}....}