Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在试用PeerJS,效果很好。
只需查看演示,Peer ID 是自动为您创建的。
有没有办法定义/设置您自己的 Peer Id?
在创建对等对象时提供对等 ID:
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.
这是您在Create a peer下链接到的页面。