Răsfoiți Sursa

api update for error types

Michelle Bu 12 ani în urmă
părinte
comite
5d78e6d6d5
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      docs/api.md

+ 2 - 2
docs/api.md

@@ -86,8 +86,7 @@ This event does not need to fire before creating or receiving connections.
 
 `function (error) { }`
 
-Emitted when an unexpected event occurs. Errors on the Peer are **always
-fatal**. Errors from the underlying socket and PeerConnections are forwarded here.
+Emitted when an unexpected event occurs. All errors on the Peer except `server-disconnected` and `incompatible-peer` are **fatal**. Errors from the underlying socket and PeerConnections are forwarded here.
 
 The `error` object also has a `type` parameter that may be helpful in responding to client errors properly:
 * `browser-incompatible`: The client's browser does not support some or all WebRTC features that you are trying to use.
@@ -100,6 +99,7 @@ The `error` object also has a `type` parameter that may be helpful in responding
   * `socket-closed`: The underlying socket closed unexpectedly.
 * (The Peer object is destroyed after one of the errors above are emitted.)
 * `server-disconnected`: A Peer that has been disconnected is being used to try to connect.
+* `incompatible-peer`: The peer that is trying to connect or that you are trying to connect to is using a browser that is different from yours. **Currently DataChannels are not interoperable between Chrome and Firefox.**
 
 ### Event: 'close'