PeerJS plugin version 1.1
Hi,
I've been sitting on this one for a bit. It allows for networking peers together without needing to write a server.
Here is the JavaScript libary it's based on:
http://peerjs.com/
The plugin:
https://www.dropbox.com/s/0ueuv9wr4wcmg ... S.zip?dl=1
/plugins/peerjsPlugin/rojo_PeerJS.zip
An example:
https://www.dropbox.com/s/kmh03nxaxn4ry ... .capx?dl=1
/plugins/peerjsPlugin/peerjs_2player.capx
To connect to someone else you need to know their id. The capx should help to show how it's done.
Now for the disclaimer:
This plugin is based on PeerJS, which in turn is based on webrtc. Webrtc is in an experimental state so it won't work on all browsers.
It currently only works on Chrome and Firefox, both on Windows and Android. It likely works on Mac and Linux as well but I haven't tested it there. It currently doesn't work on ios.
Also connections can only be made between the same browser types. AKA chrome with chrome or firefox with firefox. Chrome and firefox can't communicate with each other with peerjs.
Lastly this plugin doesn't work with the minifier when exporting.
cheers.R0J0hound2013-11-20 19:14:25