Skip to content

Commit

Permalink
don't auto-connect
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincennis committed Apr 13, 2013
1 parent 4788ab4 commit 13e5448
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/js/sample.js
Expand Up @@ -30,7 +30,7 @@ pc.onicecandidate = function( e ){
pc.onaddstream = function( e ){
var vid = document.createElement('video');
vid.src = URL.createObjectURL(e.stream);
document.body.appendCHild(vid);
document.body.appendChild(vid);
vid.play();
console.log('start remote video stream');
};
Expand All @@ -44,7 +44,7 @@ function broadcast() {
vid.play();
vid.volume = 0;
pc.addStream(s);
connect();
//connect();
});
};

Expand Down Expand Up @@ -79,7 +79,7 @@ function evtHandler( data ){
pc.createAnswer(function( description ){
console.log('sending answer');
pc.setLocalDescription(description);
socket.send(JSON.stringify({
ws.send(JSON.stringify({
type: 'received_answer',
data: description,
id: _id
Expand Down Expand Up @@ -114,4 +114,4 @@ window.onload = broadcast;
window.onbeforeunload = function(){
ws.send(JSON.stringify({type: 'close', data: {id: _id} }));
pc = null;
};
};

0 comments on commit 13e5448

Please sign in to comment.