afrokick 5 years ago
parent
commit
c4ede53a73
3 changed files with 25 additions and 44 deletions
  1. 5 20
      docs/api.json
  2. 18 22
      docs/index.html
  3. 2 2
      docs/template.html

+ 5 - 20
docs/api.json

@@ -2,7 +2,7 @@
   {
     "name": "Peer",
     "type": "constructor",
-    "snippet": "var peer = new Peer([id], [options]);",
+    "snippet": "const peer = new Peer([id], [options]);",
     "description": "A peer can connect to other peers and listen for connections.",
     "children": [
       {
@@ -44,9 +44,6 @@
           {
             "name": "secure",
             "type": "boolean",
-            "tags": [
-              "beta (0.3.0)"
-            ],
             "description": "<code>true</code> if you're using SSL.<span class='tip'>Note that our cloud-hosted server and assets may not support SSL.</span>"
           },
           {
@@ -57,9 +54,6 @@
           {
             "name": "debug",
             "type": "number",
-            "tags": [
-              "beta (0.3.0)"
-            ],
             "description": "Prints log messages depending on the debug level passed in. Defaults to <code>0</code>.",
             "children": [
               {
@@ -87,7 +81,7 @@
   {
     "name": "peer.connect",
     "type": "method",
-    "snippet": "var <a href='#dataconnection'>dataConnection</a> = peer.connect(id, [options]);",
+    "snippet": "const <a href='#dataconnection'>dataConnection</a> = peer.connect(id, [options]);",
     "description": "Connects to the remote peer specified by <code>id</code> and returns a data connection. Be sure to listen on the <a href='#peeron-error'><code>error</code></a> event in case the connection fails.",
     "children": [
       {
@@ -125,11 +119,8 @@
   },
   {
     "name": "peer.call",
-    "tags": [
-      "beta (0.3.0)"
-    ],
     "type": "method",
-    "snippet": "var <a href='#mediaconnection'>mediaConnection</a> = peer.call(id, stream, [options]);",
+    "snippet": "const <a href='#mediaconnection'>mediaConnection</a> = peer.call(id, stream, [options]);",
     "description": "Calls the remote peer specified by <code>id</code> and returns a media connection. Be sure to listen on the <a href='#peeron-error'><code>error</code></a> event in case the connection fails.",
     "children": [
       {
@@ -149,7 +140,7 @@
         "children": [
           {
             "name": "metadata",
-            "description": "Metadata associated with the connection, passed in by whoever initiated the connection. Can be accessed with <a href='#dataconnection-metadata'><code>dataConnection.metadata</code></a>. Can be any serializable type."
+            "description": "Metadata associated with the connection, passed in by whoever initiated the connection. Can be accessed with <a href='#mediaconnection-metadata'><code>mediaConnection.metadata</code></a>. Can be any serializable type."
           },
           {
             "name": "sdpTransform",
@@ -181,9 +172,6 @@
       {
         "name": "'call'",
         "type": "event",
-        "tags": [
-          "beta (0.3.0)"
-        ],
         "snippet": "peer.on('call', function(<a href='#mediaconnection'>mediaConnection</a>) { ... });",
         "description": "Emitted when a remote peer attempts to call you. The emitted <code>mediaConnection</code> is not yet active; you must first answer the call (<a href='#mediaconnection-answer'><code>mediaConnection.answer([stream]);</code></a>). Then, you can listen for the <a href='#mediaconnection-on'><code>stream</code></a> event."
       },
@@ -437,16 +425,13 @@
   {
     "name": "MediaConnection",
     "type": "class",
-    "tags": [
-      "beta (0.3.0)"
-    ],
     "description": "Wraps WebRTC's media streams. To get one, use <a href='#peercall'><code>peer.call</code></a> or listen for the <a href='#peeron-call'><code>call</code></a> event.",
     "children": [
       {
         "name": ".answer",
         "type": "method",
         "snippet": "mediaConnection.answer([stream],[options]);",
-        "description": "When recieving a <a href='#peeron-call'><code>call</code></a> event on a peer, you can call <code>.answer</code> on the media connection provided by the callback to accept the call and optionally send your own media stream.",
+        "description": "When receiving a <a href='#peeron-call'><code>call</code></a> event on a peer, you can call <code>.answer</code> on the media connection provided by the callback to accept the call and optionally send your own media stream.",
         "children": [
           {
             "name": "stream",

+ 18 - 22
docs/index.html

@@ -19,9 +19,9 @@
     <h2>Setup</h2>
     <h3>1. Include the Javascript client</h3>
     <p>Add the PeerJS client library to your webpage.</p>
-    <pre>&lt;script src="https://unpkg.com/peerjs@1.2.0/dist/peerjs.min.js"&gt;&lt;/script&gt;</pre>
+    <pre>&lt;script src="https://unpkg.com/peerjs@1.3.0/dist/peerjs.min.js"&gt;&lt;/script&gt;</pre>
     <p>If you prefer, you can host it yourself:
-      <a download href="https://unpkg.com/peerjs@1.2.0/dist/peerjs.min.js">peerjs.min.js</a>, or
+      <a download href="https://unpkg.com/peerjs@1.3.0/dist/peerjs.min.js">peerjs.min.js</a>, or
       <a href="https://github.com/peers/peerjs">fork us on Github</a>.</p>
     <h3>2. Create the Peer object</h3>
     <p>The Peer object is where we create and receive connections.</p>
@@ -208,7 +208,7 @@ var peer = new Peer({
 
   <section class="api">
     <div class="toplevel " id="peer"><span class="name"><a href="#peer">Peer</a><span
-          class="tag type constructor">constructor</span><span class="snippet">var peer = new Peer([id],
+          class="tag type constructor">constructor</span><span class="snippet">const peer = new Peer([id],
           [options]);</span></span>
       <p class="description">A peer can connect to other peers and listen for connections.</p>
       <div class="children">
@@ -251,9 +251,8 @@ var peer = new Peer({
               <p class="description">The path where your self-hosted PeerServer is running. Defaults to
                 <code>'/'</code>.</p>
             </div>
-            <div class="child beta_030 " id="peer-options-secure"><span class="name"><a
-                  href="#peer-options-secure">secure</a><span class="tag type boolean">boolean</span><span
-                  class="tag beta_030">beta (0.3.0)</span></span>
+            <div class="child " id="peer-options-secure"><span class="name"><a
+                  href="#peer-options-secure">secure</a><span class="tag type boolean">boolean</span></span>
               <p class="description"><code>true</code> if you're using SSL.<span class='tip'>Note that our cloud-hosted
                   server and assets may not support SSL.</span></p>
             </div>
@@ -264,9 +263,8 @@ var peer = new Peer({
                 <code>{ 'iceServers': [{ 'urls': 'stun:stun.l.google.com:19302' }], 'sdpSemantics': 'unified-plan' }</code>
               </p>
             </div>
-            <div class="child beta_030 " id="peer-options-debug"><span class="name"><a
-                  href="#peer-options-debug">debug</a><span class="tag type number">number</span><span
-                  class="tag beta_030">beta (0.3.0)</span></span>
+            <div class="child " id="peer-options-debug"><span class="name"><a href="#peer-options-debug">debug</a><span
+                  class="tag type number">number</span></span>
               <p class="description">Prints log messages depending on the debug level passed in. Defaults to
                 <code>0</code>.</p>
               <div class="children">
@@ -293,8 +291,8 @@ var peer = new Peer({
       </div>
     </div>
     <div class="toplevel " id="peerconnect"><span class="name"><a href="#peerconnect">peer.connect</a><span
-          class="tag type method">method</span><span class="snippet">var <a href='#dataconnection'>dataConnection</a> =
-          peer.connect(id, [options]);</span></span>
+          class="tag type method">method</span><span class="snippet">const <a href='#dataconnection'>dataConnection</a>
+          = peer.connect(id, [options]);</span></span>
       <p class="description">Connects to the remote peer specified by <code>id</code> and returns a data connection. Be
         sure to listen on the <a href='#peeron-error'><code>error</code></a> event in case the connection fails.</p>
       <div class="children">
@@ -340,9 +338,9 @@ var peer = new Peer({
         </div>
       </div>
     </div>
-    <div class="toplevel beta_030 " id="peercall"><span class="name"><a href="#peercall">peer.call</a><span
-          class="tag type method">method</span><span class="tag beta_030">beta (0.3.0)</span><span class="snippet">var
-          <a href='#mediaconnection'>mediaConnection</a> = peer.call(id, stream, [options]);</span></span>
+    <div class="toplevel " id="peercall"><span class="name"><a href="#peercall">peer.call</a><span
+          class="tag type method">method</span><span class="snippet">const <a
+            href='#mediaconnection'>mediaConnection</a> = peer.call(id, stream, [options]);</span></span>
       <p class="description">Calls the remote peer specified by <code>id</code> and returns a media connection. Be sure
         to listen on the <a href='#peeron-error'><code>error</code></a> event in case the connection fails.</p>
       <div class="children">
@@ -363,7 +361,7 @@ var peer = new Peer({
                   href="#peercall-options-metadata">metadata</a></span>
               <p class="description">Metadata associated with the connection, passed in by whoever initiated the
                 connection. Can be accessed with <a
-                  href='#dataconnection-metadata'><code>dataConnection.metadata</code></a>. Can be any serializable
+                  href='#mediaconnection-metadata'><code>mediaConnection.metadata</code></a>. Can be any serializable
                 type.</p>
             </div>
             <div class="child " id="peercall-options-sdptransform"><span class="name"><a
@@ -392,10 +390,9 @@ var peer = new Peer({
                 href='#dataconnection'>dataConnection</a>) { ... });</span></span>
           <p class="description">Emitted when a new data connection is established from a remote peer.</p>
         </div>
-        <div class="child beta_030 " id="peeron-call"><span class="name"><a href="#peeron-call">'call'</a><span
-              class="tag type event">event</span><span class="tag beta_030">beta (0.3.0)</span><span
-              class="snippet">peer.on('call', function(<a href='#mediaconnection'>mediaConnection</a>) { ...
-              });</span></span>
+        <div class="child " id="peeron-call"><span class="name"><a href="#peeron-call">'call'</a><span
+              class="tag type event">event</span><span class="snippet">peer.on('call', function(<a
+                href='#mediaconnection'>mediaConnection</a>) { ... });</span></span>
           <p class="description">Emitted when a remote peer attempts to call you. The emitted
             <code>mediaConnection</code> is not yet active; you must first answer the call (<a
               href='#mediaconnection-answer'><code>mediaConnection.answer([stream]);</code></a>). Then, you can listen
@@ -630,9 +627,8 @@ var peer = new Peer({
         </div>
       </div>
     </div>
-    <div class="toplevel beta_030 " id="mediaconnection"><span class="name"><a
-          href="#mediaconnection">MediaConnection</a><span class="tag type class">class</span><span
-          class="tag beta_030">beta (0.3.0)</span></span>
+    <div class="toplevel " id="mediaconnection"><span class="name"><a href="#mediaconnection">MediaConnection</a><span
+          class="tag type class">class</span></span>
       <p class="description">Wraps WebRTC's media streams. To get one, use <a
           href='#peercall'><code>peer.call</code></a> or listen for the <a href='#peeron-call'><code>call</code></a>
         event.</p>

+ 2 - 2
docs/template.html

@@ -19,9 +19,9 @@
     <h2>Setup</h2>
     <h3>1. Include the Javascript client</h3>
     <p>Add the PeerJS client library to your webpage.</p>
-    <pre>&lt;script src="https://unpkg.com/peerjs@1.2.0/dist/peerjs.min.js"&gt;&lt;/script&gt;</pre>
+    <pre>&lt;script src="https://unpkg.com/peerjs@1.3.0/dist/peerjs.min.js"&gt;&lt;/script&gt;</pre>
     <p>If you prefer, you can host it yourself:
-      <a download href="https://unpkg.com/peerjs@1.2.0/dist/peerjs.min.js">peerjs.min.js</a>, or
+      <a download href="https://unpkg.com/peerjs@1.3.0/dist/peerjs.min.js">peerjs.min.js</a>, or
       <a href="https://github.com/peers/peerjs">fork us on Github</a>.</p>
     <h3>2. Create the Peer object</h3>
     <p>The Peer object is where we create and receive connections.</p>