Skip to content

Commit

Permalink
fixed autocam on-ready
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlb committed Mar 22, 2018
1 parent 27df90f commit 4773f0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/webrtc-v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,11 @@ const PHONE = window.PHONE = config => {
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function onready(subscribed) {
if (subscribed) myconnection = true;
if (myconnection && autocam) readycb();
if (!(mystream && myconnection)) return;

connectcb();
readycb();
if (!autocam) readycb();
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down
3 changes: 2 additions & 1 deletion js/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,11 @@ var PHONE = window.PHONE = function(config) {
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
function onready(subscribed) {
if (subscribed) myconnection = true;
if (myconnection && autocam) readycb();
if (!(mystream && myconnection)) return;

connectcb();
readycb();
if (!autocam) readycb();
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down

0 comments on commit 4773f0a

Please sign in to comment.