Michelle Bu 11 年之前
父節點
當前提交
56a9b4374a
共有 4 個文件被更改,包括 27 次插入33 次删除
  1. 1 29
      docs/api.md
  2. 3 2
      docs/index.html
  3. 20 0
      docs/style.css
  4. 3 2
      docs/template.html

+ 1 - 29
docs/api.md

@@ -3,34 +3,6 @@
 **Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.
 **Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.
 [View the status page for full details](http://peerjs.com/status).**
 [View the status page for full details](http://peerjs.com/status).**
 
 
-- [Class: peerjs.Peer](#class-peerjspeer)
-  - [new Peer([id], [options])](#new-peerid-options)
-  - [Peer.browser](#peerbrowser)
-  - [peer.id](#peerid)
-  - [peer.connections](#peerconnections)
-  - [peer.connect(id, [options])](#peerconnectid-options)
-  - [peer.destroy()](#peerdestroy)
-  - [peer.disconnect()](#peerdisconnect)
-  - [peer.disconnected](#peerdisconnected)
-  - [peer.destroyed](#peerdestroyed)
-  - [Event: 'connection'](#event-connection)
-  - [Event: 'open'](#event-open)
-  - [Event: 'error'](#event-error)
-  - [Event: 'close'](#event-close)
-- [Class: peerjs.DataConnection](#class-peerjsdataconnection)
-  - [EXPERIMENTAL reliable and large file transfer:](#experimental-reliable-and-large-file-transfer)
-  - [connection.peer](#connectionpeer)
-  - [connection.open](#connectionopen)
-  - [connection.metadata](#connectionmetadata)
-  - [connection.label](#connectionlabel)
-  - [connection.serialization](#connectionserialization)
-  - [connection.send(data)](#connectionsenddata)
-  - [connection.close()](#connectionclose)
-  - [Event: 'data'](#event-data)
-  - [Event: 'open'](#event-open-1)
-  - [Event: 'error'](#event-error-1)
-  - [Event: 'close'](#event-close-1)
-
 ## Class: peerjs.Peer
 ## Class: peerjs.Peer
 
 
 This class is a Peer, which can connect to other peers and listen for connections. It is an `EventEmitter`.
 This class is a Peer, which can connect to other peers and listen for connections. It is an `EventEmitter`.
@@ -55,7 +27,7 @@ In the options, either a PeerServer Cloud `key` must be provided or `host` and `
 
 
 The `config` object is passed straight into instances of `RTCPeerConnection`. For compatibility with symmetric NATs, you can provide your own TURN server. By default the STUN server provided by Google is used.
 The `config` object is passed straight into instances of `RTCPeerConnection`. For compatibility with symmetric NATs, you can provide your own TURN server. By default the STUN server provided by Google is used.
 
 
-### Peer.browser
+### Peer.browser (deprecated after 0.3.0)
 
 
 The type of browser the client is on. Currently WebRTC DataChannels are not
 The type of browser the client is on. Currently WebRTC DataChannels are not
 interoperable so different browser types should not be connected.
 interoperable so different browser types should not be connected.

+ 3 - 2
docs/index.html

@@ -1,6 +1,6 @@
 <head>
 <head>
-  <link href="/style.css" rel="stylesheet" type="text/css">
-  <script type="text/javascript" src="/index.js"></script>
+  <link href="./style.css" rel="stylesheet" type="text/css">
+  <script type="text/javascript" src="./index.js"></script>
 </head>
 </head>
 
 
 <body>
 <body>
@@ -209,6 +209,7 @@ for no serialization. Default serialization format is <code>binary</code>.</p>
   </section>
   </section>
 
 
   <section class="start">
   <section class="start">
+    <h1>PeerJS docs</h1>
     <h2>Get started with PeerJS</h2>
     <h2>Get started with PeerJS</h2>
 
 
       <div class="warning">Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.<br><a href="/status">View the status page for full details</a>.</div>
       <div class="warning">Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.<br><a href="/status">View the status page for full details</a>.</div>

+ 20 - 0
docs/style.css

@@ -0,0 +1,20 @@
+.api, .start {
+  position: absolute;
+  top: 0px;
+  bottom: 0px;
+  overflow: scroll;
+  box-sizing: border-box;
+  padding: 20px;
+}
+
+.start {
+  right: 0px;
+  width: 60%;
+  background-color: #fff;
+}
+
+.api {
+  left: 0px;
+  width: 40%;
+  background-color: #ccc;
+}

+ 3 - 2
docs/template.html

@@ -1,6 +1,6 @@
 <head>
 <head>
-  <link href="/style.css" rel="stylesheet" type="text/css">
-  <script type="text/javascript" src="/index.js"></script>
+  <link href="./style.css" rel="stylesheet" type="text/css">
+  <script type="text/javascript" src="./index.js"></script>
 </head>
 </head>
 
 
 <body>
 <body>
@@ -11,6 +11,7 @@
   </section>
   </section>
 
 
   <section class="start">
   <section class="start">
+    <h1>PeerJS docs</h1>
     <h2>Get started with PeerJS</h2>
     <h2>Get started with PeerJS</h2>
 
 
       <div class="warning">Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.<br><a href="/status">View the status page for full details</a>.</div>
       <div class="warning">Due to browsers' incomplete support of the WebRTC DataChannel specification, many features of PeerJS have caveats.<br><a href="/status">View the status page for full details</a>.</div>