Michelle Bu 12 年之前
父節點
當前提交
f8ce0c1757
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/api.md

+ 1 - 1
docs/api.md

@@ -9,7 +9,7 @@ This class is a Peer, which can connect to other peers and listen for connection
 
 ### new Peer([id], [options])
 
-* `id` String. The id by which this peer will be identified when other peers try to connect to it. If no id is given, one will be generated by the server
+* `id` String. The id by which this peer will be identified when other peers try to connect to it. If no id is given, one will be generated by the server. **Note that this ID is mainly used for brokering and that it is not recommended that you use it to identify peers. Also note that you can set a `metadata` option to send other identifying information.**
 * `options` Object
   * `key` String. API key for cloud PeerServer. Is not used for servers other than `cloud.peerjs.com`
   * `host` String. Server host. Default `cloud.peerjs.com`. Also accepts `'/'` for relative hostname.