Permalink
Browse files

convenient examples and merge with master

  • Loading branch information...
2 parents f7314a3 + 6060729 commit 35dcd0959a567c8ec6d57dd137667a251e128b60 @michelle michelle committed Mar 31, 2013
Showing with 8 additions and 7 deletions.
  1. +1 −1 changelog.md
  2. +1 −1 dist/peer.js
  3. +1 −1 dist/peer.min.js
  4. +1 −1 docs/api.md
  5. +2 −1 examples/chat.html
  6. +1 −1 examples/helloworld.html
  7. +1 −1 lib/peer.js
View
@@ -1,7 +1,7 @@
# PeerJS Changelog
## Version 0.2.1 (Pending)
-* **Warning**: this build changes the error of type `peer-destroyed` to `peer-disconnected`.
+* **Warning**: this build changes the error of type `peer-destroyed` to `server-disconnected`.
* Browser detection added. If an incompatible browser is detected, the `browser-incompatible` error is emitted from the `Peer`.
* Added a `.disconnect()` method to `Peer`, which can be called to close connections to the PeerServer (but not any active DataConnections).
View
@@ -1419,7 +1419,7 @@ Peer.prototype._cleanup = function() {
* is waiting for an ID. */
Peer.prototype.connect = function(peer, options) {
if (this.disconnected) {
- this._warn('peer-disconnected', 'This Peer has been disconnected from the server and');
+ this._warn('server-disconnected', 'This Peer has been disconnected from the server and can no longer make connections.');
return;
}
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -99,7 +99,7 @@ The `error` object also has a `type` parameter that may be helpful in responding
* `socket-error`: An error from the underlying socket.
* `socket-closed`: The underlying socket closed unexpectedly.
* (The Peer object is destroyed after one of the errors above are emitted.)
-* `peer-disconnected`: A Peer that has been disconnected is being used to try to connect.
+* `server-disconnected`: A Peer that has been disconnected is being used to try to connect.
### Event: 'close'
View
@@ -9,9 +9,10 @@
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="http://cdn.peerjs.com/0/peer.js"></script>
+<script type="text/javascript" src="../dist/peer.js"></script>
<script>
// Connect to PeerJS, have server assign an ID instead of providing one
-var peer = new Peer({key: 'lwjd5qra8257b9', debug: true});
+peer = new Peer({key: 'lwjd5qra8257b9', debug: true});
// Show this peer's ID.
peer.on('open', function(id){
View
@@ -7,12 +7,12 @@
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="http://cdn.peerjs.com/0/peer.js"></script>
+<script src="../dist/peer.js"></script>
<script>
// This is a very simple code example. See chat.html for a more involved
// example.
$(document).ready(function() {
- var peer1, peer2, peerId1;
// Create a new Peer with our demo API key, with debug set to true so we can
// see what's going on.
View
@@ -247,7 +247,7 @@ Peer.prototype._cleanup = function() {
* is waiting for an ID. */
Peer.prototype.connect = function(peer, options) {
if (this.disconnected) {
- this._warn('peer-disconnected', 'This Peer has been disconnected from the server and');
+ this._warn('server-disconnected', 'This Peer has been disconnected from the server and can no longer make connections.');
return;
}

0 comments on commit 35dcd09

Please sign in to comment.