最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - PeerJS Set your own PeerID - Stack Overflow

programmeradmin1浏览0评论

I am trying out PeerJS and it works great.

Just looking at the demo's the Peer ID is auto created for you.

Is there a way to define / set your own Peer Id?

I am trying out PeerJS and it works great.

Just looking at the demo's the Peer ID is auto created for you.

Is there a way to define / set your own Peer Id?

Share Improve this question asked Jan 19, 2014 at 12:29 Satch3000Satch3000 49.5k90 gold badges225 silver badges349 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

Provide a peer id when you create the peer object:

var peer = new Peer('pick-an-id', {key: 'myapikey'}); 
// You can pick your own id or omit the id if you want to get a random one from the server.

This is right off the page you linked to under Create a peer.

发布评论

评论列表(0)

  1. 暂无评论