switched to self hosted peerjs server
This commit is contained in:
parent
3c21fd08b7
commit
590c5ea900
@ -24,7 +24,25 @@ The first parameter of `createPeerJsConnector` is forwarded as the options objec
|
|||||||
Therefore, you may also specify the server/port here, if you have set up your own server.
|
Therefore, you may also specify the server/port here, if you have set up your own server.
|
||||||
*/
|
*/
|
||||||
var yatta, yattaHandler;
|
var yatta, yattaHandler;
|
||||||
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'};
|
||||||
|
|
||||||
|
/**
|
||||||
|
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 = {
|
||||||
|
host: "terrific-peerjs.herokuapp.com",
|
||||||
|
port: "", // this works because heroku can forward to the right port.
|
||||||
|
// debug: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
Y.createPeerJsConnector(conn, function(Connector, user_id){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
You can also specify your own user_id with peerjs.
|
You can also specify your own user_id with peerjs.
|
||||||
|
@ -25,18 +25,23 @@ 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/))
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
// this will connect to the server owned by the peerjs team.
|
/**
|
||||||
// For now, you can use my API key.
|
This will connect to the server owned by the peerjs team.
|
||||||
var conn = {key: 'h7nlefbgavh1tt9'};
|
For now, you can use my API key.
|
||||||
|
*/
|
||||||
|
// 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/",
|
host: "terrific-peerjs.herokuapp.com",
|
||||||
port: 4609,
|
port: "", // this works because heroku can forward to the right port.
|
||||||
path: "/",
|
// debug: true,
|
||||||
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){
|
Y.createPeerJsConnector(conn, function(Connector, user_id){
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,26 @@ The first parameter of `createPeerJsConnector` is forwarded as the options objec
|
|||||||
Therefore, you may also specify the server/port here, if you have set up your own server.
|
Therefore, you may also specify the server/port here, if you have set up your own server.
|
||||||
*/
|
*/
|
||||||
var yatta, yattaHandler;
|
var yatta, yattaHandler;
|
||||||
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'};
|
||||||
|
|
||||||
|
/**
|
||||||
|
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 = {
|
||||||
|
host: "terrific-peerjs.herokuapp.com",
|
||||||
|
port: "", // this works because heroku can forward to the right port.
|
||||||
|
// debug: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
Y.createPeerJsConnector(conn, function(Connector, user_id){
|
||||||
|
|
||||||
yatta = new Y.XmlFramework(user_id, Connector);
|
yatta = new Y.XmlFramework(user_id, Connector);
|
||||||
|
|
||||||
|
@ -24,7 +24,26 @@ The first parameter of `createPeerJsConnector` is forwarded as the options objec
|
|||||||
Therefore, you may also specify the server/port here, if you have set up your own server.
|
Therefore, you may also specify the server/port here, if you have set up your own server.
|
||||||
*/
|
*/
|
||||||
var yatta, yattaHandler;
|
var yatta, yattaHandler;
|
||||||
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'};
|
||||||
|
|
||||||
|
/**
|
||||||
|
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 = {
|
||||||
|
host: "terrific-peerjs.herokuapp.com",
|
||||||
|
port: "", // this works because heroku can forward to the right port.
|
||||||
|
// debug: true
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Y.createPeerJsConnector(conn, function(Connector, user_id){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
You can also specify your own user_id with peerjs.
|
You can also specify your own user_id with peerjs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user