Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Tweak for new API
Browse files Browse the repository at this point in the history
  • Loading branch information
ekr committed Mar 16, 2012
1 parent 0b3d799 commit 7592b82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/static/js/mozdemo.js
Expand Up @@ -55,13 +55,13 @@ var CallingClient = function(config_, username, peer, video_, start_call) {
};

log ("Calling client: user=" + username + " peer = " + peer);
var webrtc = navigator.webrtcCreateContext(JSON.stringify(config));
var webrtc = navigator.getWebrtcContext(JSON.stringify(config));

var poll_success = function(msg) {
var js = JSON.parse(msg);
log("Received message " + JSON.stringify(js));

navigator.webrtcProcessMessage(webrtc, js.body);
webrtc.processMessage(js.body);
setTimeout(poll, poll_timeout);
};

Expand All @@ -78,7 +78,7 @@ var CallingClient = function(config_, username, peer, video_, start_call) {
};

var internal_poll = function() {
msg = navigator.webrtcMessagePoll(webrtc);
msg = webrtc.messagePoll();

if (msg !== "") {
log("Received message from webrtc subsystem");
Expand All @@ -105,7 +105,7 @@ var CallingClient = function(config_, username, peer, video_, start_call) {

if (start_call) {
log("Making call to " + peer);
navigator.webrtcStartCall(webrtc);
webrtc.startCall();
}
else {
log("Waiting for call as " + username);
Expand Down

0 comments on commit 7592b82

Please sign in to comment.