switch to self hosted peerjs server

This commit is contained in:
Kevin Jahns 2014-10-06 15:55:10 +02:00
parent d2f16eaa87
commit 3c21fd08b7
37 changed files with 60 additions and 292 deletions

View File

@ -14,7 +14,7 @@ Unlike other frameworks, Yatta! supports P2P message propagation and is not boun
It is possible to add any communication protocol to Yatta. Currently it supports: It is possible to add any communication protocol to Yatta. Currently it supports:
* [PeerJs](http://peerjs.com/) - A WebRTC Framework * [PeerJs](http://peerjs.com/) - A WebRTC Framework
* [SimpleWebRTC](http://simplewebrtc.com/) - Another WebRTC Framework * [SimpleWebRTC](http://simplewebrtc.com/) - Another WebRTC Framework (coming soon)
* [IWC](http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication) - Inter-widget Communication * [IWC](http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication) - Inter-widget Communication
## Use it! ## Use it!

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -258,11 +258,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -302,11 +302,7 @@ data from the received intent.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -335,11 +335,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -466,11 +466,7 @@ if (x.type === &quot;JsonType&quot;) {
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -139,11 +139,7 @@ console.log(w.newProperty == &quot;Awesome&quot;) # true!</code></pre>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -242,11 +242,7 @@ on how to do that with urls.</p>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -356,11 +356,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -455,11 +455,7 @@ yatta.bind(textbox);</code></pre>
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -303,11 +303,7 @@ JsonFramework was initialized (Depending on the HistoryBuffer implementation).</
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -38,11 +38,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,9 +39,10 @@ Yatta! provides similar functionality as <a href="https://github.com/share/Share
but does not require you to understand how the internals work. The predefined data structures provide a simple API to access your shared data structures.</p><p>Predefined data structures:</p><ul> but does not require you to understand how the internals work. The predefined data structures provide a simple API to access your shared data structures.</p><p>Predefined data structures:</p><ul>
<li>Text - <a href="http://dadamonad.github.io/Yatta/examples/TextEditing/">Collaborative Text Editing Example</a> and <a href="./examples/TextEditing/">Source</a></li> <li>Text - <a href="http://dadamonad.github.io/Yatta/examples/TextEditing/">Collaborative Text Editing Example</a> and <a href="./examples/TextEditing/">Source</a></li>
<li>Json - <a href="./examples/PeerJs-Json/">Tutorial</a></li> <li>Json - <a href="./examples/PeerJs-Json/">Tutorial</a></li>
<li>XML (coming soon)</li> <li>XML - <a href="./XmlExample">XML Example</a> Collaboratively manipulate the dom with native dom-features and jQuery.</li>
</ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>It is possible to add any communication protocol to Yatta. Currently it supports:</p><ul> </ul><p>Unlike other frameworks, Yatta! supports P2P message propagation and is not bound to a specific communication protocol.</p><p>It is possible to add any communication protocol to Yatta. Currently it supports:</p><ul>
<li><a href="http://peerjs.com/">PeerJs</a> - A WebRTC Framework</li> <li><a href="http://peerjs.com/">PeerJs</a> - A WebRTC Framework</li>
<li><a href="http://simplewebrtc.com/">SimpleWebRTC</a> - Another WebRTC Framework (coming soon)</li>
<li><a href="http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication">IWC</a> - Inter-widget Communication</li> <li><a href="http://dbis.rwth-aachen.de/cms/projects/the-xmpp-experience#interwidget-communication">IWC</a> - Inter-widget Communication</li>
</ul> </ul>
<h2 id="use-it-">Use it!</h2><p>The <a href="./examples/">examples</a> provide an excellent starting point for beginners. Also the <a href="http://dadamonad.github.io/Yatta/doc/">API Documentation</a> could prove to be very helpful.</p><p>Either clone this git repository, install it with <a href="http://bower.io/">bower</a>, or install it with <a href="https://www.npmjs.org/package/yatta">npm</a>.</p><h3 id="bower">Bower</h3> <h2 id="use-it-">Use it!</h2><p>The <a href="./examples/">examples</a> provide an excellent starting point for beginners. Also the <a href="http://dadamonad.github.io/Yatta/doc/">API Documentation</a> could prove to be very helpful.</p><p>Either clone this git repository, install it with <a href="http://bower.io/">bower</a>, or install it with <a href="https://www.npmjs.org/package/yatta">npm</a>.</p><h3 id="bower">Bower</h3>
@ -68,13 +69,14 @@ Yatta! means &quot;I did it!&quot; in Japanese. You scream it when you accomplis
There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h2 id="status">Status</h2><p>Yatta! is still in an early development phase. Don&#39;t expect that everything is working fine. There is also this awesome video on the Internet that will change your life <a href="https://www.youtube.com/watch?v=kL5DDSglM_s">Yatta</a>.</p><h2 id="status">Status</h2><p>Yatta! is still in an early development phase. Don&#39;t expect that everything is working fine.
But I would become really motivated if you gave me some feedback :) (<a href="https://github.com/DadaMonad/Yatta/issues">github</a>).</p><h3 id="current-issues">Current Issues</h3> But I would become really motivated if you gave me some feedback :) (<a href="https://github.com/DadaMonad/Yatta/issues">github</a>).</p><h3 id="current-issues">Current Issues</h3>
<ul> <ul>
<li>XML support</li> <li>HTML editable tag</li>
<li>More efficient representation of text.</li>
<li>Use a better data structure for the History Buffer - it should be possible to use Arrays.</li>
<li>SimpleRTC support</li>
</ul> </ul>
<<<<<<< HEAD <h2 id="support">Support</h2><p>Please report <em>any</em> issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!
<h2 id="support">Support</h2><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="&#x6d;&#97;&#x69;&#x6c;&#x74;&#111;&#x3a;&#107;&#101;&#118;&#x69;&#110;&#x2e;&#x6a;&#97;&#x68;&#x6e;&#x73;&#x40;&#x72;&#x77;&#116;&#104;&#x2d;&#x61;&#x61;&#99;&#104;&#101;&#110;&#46;&#100;&#101;">&#107;&#101;&#118;&#x69;&#110;&#x2e;&#x6a;&#97;&#x68;&#x6e;&#x73;&#x40;&#x72;&#x77;&#116;&#104;&#x2d;&#x61;&#x61;&#99;&#104;&#101;&#110;&#46;&#100;&#101;</a> I would appreciate if developers gave me feedback on how <em>convenient</em> the framework is, and if it is easy to use. Particularly the XML-support may not support every DOM-methods - if you encounter a method that does not cause any change on other peers,
======= please state function name, and sample parameters. However, there are browser-specific features, that Yatta won&#39;t support.</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="&#x6d;&#97;&#105;&#108;&#116;&#111;&#58;&#x6b;&#x65;&#x76;&#105;&#x6e;&#46;&#106;&#97;&#104;&#x6e;&#115;&#64;&#114;&#119;&#116;&#x68;&#45;&#x61;&#97;&#x63;&#104;&#101;&#x6e;&#x2e;&#100;&#101;">&#x6b;&#x65;&#x76;&#105;&#x6e;&#46;&#106;&#97;&#104;&#x6e;&#115;&#64;&#114;&#119;&#116;&#x68;&#45;&#x61;&#97;&#x63;&#104;&#101;&#x6e;&#x2e;&#100;&#101;</a>
<h2 id="support">Support</h2><p>Please report any issues to the <a href="https://github.com/DadaMonad/Yatta/issues">Github issue page</a>!</p><h2 id="license">License</h2><p>Yatta! is licensed under the <a href="./LICENSE.txt">MIT License</a>.</p><a href="&#109;&#97;&#x69;&#x6c;&#x74;&#x6f;&#58;&#107;&#x65;&#x76;&#x69;&#x6e;&#x2e;&#x6a;&#x61;&#x68;&#x6e;&#115;&#x40;&#114;&#x77;&#x74;&#x68;&#x2d;&#x61;&#x61;&#99;&#104;&#x65;&#x6e;&#x2e;&#x64;&#x65;">&#107;&#x65;&#x76;&#x69;&#x6e;&#x2e;&#x6a;&#x61;&#x68;&#x6e;&#115;&#x40;&#114;&#x77;&#x74;&#x68;&#x2d;&#x61;&#x61;&#99;&#104;&#x65;&#x6e;&#x2e;&#x64;&#x65;</a>
>>>>>>> XML-Support
@ -83,11 +85,7 @@ But I would become really motivated if you gave me some feedback :) (<a href="ht
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -100,11 +100,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -158,11 +158,7 @@
</div> </div>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,11 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -48,11 +48,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -60,11 +60,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -60,11 +60,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -60,11 +60,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -48,11 +48,7 @@
</dl> </dl>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,11 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,11 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,11 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -39,11 +39,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -37,11 +37,7 @@
</table> </table>
</div> </div>
<div id='footer'> <div id='footer'>
<<<<<<< HEAD October 06, 14 15:25:31 by
October 06, 14 10:34:33 by
=======
October 06, 14 10:16:21 by
>>>>>>> XML-Support
<a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'> <a href='https://github.com/coffeedoc/codo' title='CoffeeScript API documentation generator'>
Codo Codo
</a> </a>

View File

@ -29,7 +29,14 @@ Here, we use the PeerJs connector. Its first parameter is the API key that you n
```js ```js
Y.createPeerJsConnector({key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){ /*
var conn = {key: 'h7nlefbgavh1tt9'}; // this will connect to the server owned by the peerjs team.
*/
var conn = {
host: "127.0.0.1/", //"terrific-peerjs.herokuapp.com/",
port: 5000
};
Y.createPeerJsConnector(conn , function(Connector, user_id){
``` ```

View File

@ -25,7 +25,20 @@ function init(){
First create the connector - the underlaying communication protocol. First create the connector - the underlaying communication protocol.
Here, we use the PeerJs connector. Its first parameter is the API key that you need to specify (see [website](http://peerjs.com/)) Here, we use the PeerJs connector. Its first parameter is the API key that you need to specify (see [website](http://peerjs.com/))
*/ */
Y.createPeerJsConnector({key: 'h7nlefbgavh1tt9'}, function(Connector, user_id){ /*
// 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 = {
host: "terrific-peerjs.herokuapp.com/",
port: 4609,
path: "/",
debug: true,
secure: false
}; // I can't guaranty that this will be always up. This is why you should use the previous method with the api key.
Y.createPeerJsConnector(conn, function(Connector, user_id){
/** /**
TextFramework is a shared text object. If you change something on this object, TextFramework is a shared text object. If you change something on this object,
it will be instantaneously shared with all the other collaborators. it will be instantaneously shared with all the other collaborators.

View File

@ -63,13 +63,6 @@ Connect to other peer.
yatta.val($("#collaborative")[0]) yatta.val($("#collaborative")[0])
console.log(yatta.getUserId()); console.log(yatta.getUserId());
$("#collaborative").attr("contenteditable","true");
$("#collaborative")[0].onkeyup = function(){
console.log("dtrn");
console.log("rtdn");
}
$("p")[0].onfocus = function(){
console.log("nrtduiaenrtduiaer");
}
}); });
``` ```