demos/js/demo_multiparty.js
function establishConnection(position) {
        function callSuccess() {
            connectCount++;
            if( connectCount < maxCALLERS && position > 0) {
                establishConnection(position-1);
            }
        }
        function callFailure(errorCode, errorText) {
            easyrtc.showError(errorCode, errorText);
            if( connectCount < maxCALLERS && position > 0) {
                establishConnection(position-1);
            }
        }
        easyrtc.call(list[position], callSuccess, callFailure);

    }
function establishConnection(position) {
        function callSuccess() {
            connectCount++;
            if( connectCount < maxCALLERS && position > 0) {
                establishConnection(position-1);
            }
        }
        function callFailure(errorCode, errorText) {
            easyrtc.showError(errorCode, errorText);
            if( connectCount < maxCALLERS && position > 0) {
                establishConnection(position-1);
            }
        }
        easyrtc.call(list[position], callSuccess, callFailure);

    }
function establishConnection ( position ) { function callSuccess ( ) { connectCount ++ ; if ( connectCount < maxCALLERS && position > 0 ) { establishConnection ( position - 1 ) ; } } function callFailure ( errorCode , errorText ) { easyrtc . showError ( errorCode , errorText ) ; if ( connectCount < maxCALLERS && position > 0 ) { establishConnection ( position - 1 ) ; } } easyrtc . call ( list [ position ] , callSuccess , callFailure ) ; }
Connect in reverse order. Latter arriving people are more likely to have empty slots.
Connect in reverse order . Latter arriving people are more likely to have empty slots .