Jelajahi Sumber

demo updates

Michelle Bu 12 tahun lalu
induk
melakukan
358dc58b48
3 mengubah file dengan 5 tambahan dan 39 penghapusan
  1. 1 25
      demo/static/page.html
  2. 2 12
      demo/static/peer.html
  3. 2 2
      demo/static/peer1.html

+ 1 - 25
demo/static/page.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML> 
 <html lang="en"> 
 <head>
-<title>Sink Test</title>
+<title>PeerJS Test Page</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
 <meta http-equiv="Content-Language" content="en-us"> 
 <meta name="description" content=""> 
@@ -9,30 +9,6 @@
 
 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> 
 <script type="text/javascript" src="/peer.js"></script>
-<script>
-$(document).ready(function() {
-  pc1 = new Peer({ video: true });
-  pc1.on('ready', function(id) {
-    console.log(id);
-    pc2 = new Peer({ source: id, audio: true });
-  });
-  pc1.on('connection', function(recipient) {
-    console.log('connection');
-    pc1.send('Hi there!');
-  });
-  pc1.on('data', function(data) {
-    console.log(data);
-  });
-  pc1.on('localstream', function(type, stream) {
-    console.log('Local stream: ', type);
-  });
-  pc1.on('remotestream', function(type, stream) {
-    console.log('Remote stream: ', type);
-  });
-
-});
-
-</script>
 
 </head> 
  

+ 2 - 12
demo/static/sinkoriginator.html → demo/static/peer.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML> 
 <html lang="en"> 
 <head>
-<title>Sink Test</title>
+<title>Peer Test</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
 <meta http-equiv="Content-Language" content="en-us"> 
 <meta name="description" content=""> 
@@ -31,16 +31,6 @@ $(document).ready(function() {
 </head> 
  
 <body> 
-  This is a P2P originator sink.
-  <br><br>
-  Local:
-  <br>
-  <video id="localVideo" width="75" height="54"></video>
-  <br><br>
-  Remote:
-  <br>
-  <video id="remoteVideo" width="258" height="194"></video>
-  <audio id="localAudio" muted></audio>
-  <audio id="remoteAudio"></audio>
+  This is a P2P peer.
 </body> 
 </html> 

+ 2 - 2
demo/static/sink.html → demo/static/peer1.html

@@ -1,7 +1,7 @@
 <!DOCTYPE HTML> 
 <html lang="en"> 
 <head>
-<title>Sink Test</title>
+<title>Peer Test</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
 <meta http-equiv="Content-Language" content="en-us"> 
 <meta name="description" content=""> 
@@ -36,7 +36,7 @@ $(document).ready(function() {
 </head> 
  
 <body> 
-  This is a P2P sink.
+  This is a P2P peer.
   <br><br>
   Enter source ID to connect to:
   <br><input type="text" id="source"></input>