removed errors in connector. Added new connector type - this is unfinished

This commit is contained in:
DadaMonad 2014-11-18 11:00:42 +00:00
parent ee516a6271
commit 6965678581
2 changed files with 7 additions and 6 deletions

View File

@ -7,7 +7,7 @@ Here you find some (hopefully) usefull examples on how to use Yatta!
* [IWC Tutorial](./Iwc/) Tutorial on how to use IWC Connector.
## Demos
* [Text Editing](http://dadamonad.github.io/Yatta/TextEditing/) Simple collaborative text editing demo with PeerJs and Text Framework.
* [XML Example](http://dadamonad.github.io/Yatta/XmlExample) Collaboratively manipulate the dom with native dom-features and jQuery.
* [Text Editing](http://dadamonad.github.io/Yatta/examples/TextEditing/) Simple collaborative text editing demo with PeerJs and Text Framework.
* [XML Example](http://dadamonad.github.io/Yatta/examples/XmlExample) Collaboratively manipulate the dom with native dom-features and jQuery.
* [IWC Demo](./IwcDemo/) More IWC example widgets.

View File

@ -30,20 +30,21 @@ var yatta, yattaHandler;
This will connect to the server owned by the peerjs team.
For now, you can use my API key.
*/
// var conn = {key: 'h7nlefbgavh1tt9'};
var conn = {key: 'h7nlefbgavh1tt9'};
/**
This will connect to one of my peerjs instances.
I can't guaranty that this will be always up. This is why you should use the previous method with the api key,
or set up your own server.
*/
var conn = {
/*var conn = {
host: "terrific-peerjs.herokuapp.com",
port: "", // this works because heroku can forward to the right port.
// debug: true,
};
};*/
var rid = Math.floor(Math.random()*100 + 1)
Y.createPeerJsConnector(conn, function(Connector, user_id){
Y.createPeerJsConnector(rid, conn, function(Connector, user_id){
yatta = new Y.XmlFramework(user_id, Connector);