1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <!DOCTYPE HTML>
- <html lang="en">
- <head>
- <title>Sink 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="">
- <meta name="keywords" content="">
- <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>
-
- <body>
- </body>
- </html>
|