2017-06-19 94 views
0

我试图连接到我的对等服务器托管在Heroku上。我已经使用PeerJs的'cloud'peerServer提供程序,并且我的连接可以工作,但是,我需要我自己的ssl服务器。从我的理解我的peerServer工作正常。 - >https://asphericpeerjs.herokuapp.com/连接到自己托管的PeerJS服务器 - 角

我已经根据peerjs API文档,修改了代码,但是根据铬控制台它仍然呼吁http://0.peerjs.com/.../ect/ect ...

this.peer = new Peer([], [{ host : 'https://asphericpeerjs.herokuapp.com' }]); 
     setTimeout(() => { 
      this.mypeerid = this.peer.id; 
     }, 3000); 

感谢, 韦斯

回答

0

的阵列没有必要,像这样做:

this.peer = new Peer({ host : 'https://asphericpeerjs.herokuapp.com' }); 
     setTimeout(() => { 
      this.mypeerid = this.peer.id; 
     }, 3000); 
相关问题