Problem with sending data to peer.

128 views
Skip to first unread message

iamanony...@gmail.com

unread,
Mar 22, 2015, 12:20:40 PM3/22/15
to pee...@googlegroups.com
Hello, I just found out about PeerJS yesterday, so forgive me if I'm making any stupid mistakes.  I am following the documentation and I still cannot get a simple message to be sent over a connection, or maybe I'm just not connected.  I got an API key (I even tried a second key) from the free PeerJS service provided.  For my test, I have created two files, one that creates a peer and waits for a connection, and another that creates a peer, connects to the other PID (I set the first PID to always be "m0dem"), and then sends the message "Hello!".  You can see the code for peer.1.html and peer.2.html on Pastebin.  I am using Firefox 36.0.3, so that should not be causing any problems.  Also, I am opening both of the html files on the same computer (peer.1.html first, and then peer.2.html), but I do not think that would matter.
I get this in the console: The connection to ws://0.peerjs.com:9000/peerjs?key=w6nw29yseuoqd7vi&id=m0dem&token=v3xx8fur07q was interrupted while the page was loading. 
And I also get a warning: addIceCandidate called without success/failure callbacks. This is deprecated, and will be an error in the future.
BTW: My PID does get printed out in the console.
-=m0dem=-
Reply all
Reply to author
Forward
0 new messages