Is it possible to get the easy_id from a recent connection?

62 views
Skip to first unread message

fernando vasquez

unread,
Apr 19, 2015, 7:44:33 PM4/19/15
to eas...@googlegroups.com
User A start connection to user B at any time, how B can get the user A easy id?

Eric Davies

unread,
Apr 19, 2015, 9:24:17 PM4/19/15
to eas...@googlegroups.com
when A calls B,  B's acceptChecker gets passed A's easyrtcid.

fernando vasquez

unread,
Apr 21, 2015, 2:50:40 AM4/21/15
to eas...@googlegroups.com
Thanks  a lot but I can't make acceptChecker work:

    easyrtc.setSocketUrl("http://rot...:8080");
    easyrtc.setAcceptChecker(shouldAccept);
    easyrtc.setStreamAcceptor(run);

    easyrtc.enableDebug(false);
    easyrtc.enableDataChannels(true);
    easyrtc.setDataChannelOpenListener(openListener);
    easyrtc.setDataChannelCloseListener(closeListener);
    easyrtc.setPeerListener(addToConversation);

    easyrtc.enableAudio(false);
    easyrtc.setVideoDims(250,250);
    easyrtc.setRoomOccupantListener(convertListToButtons);
    easyrtc.easyApp("easyrtc.audioVideoSimple", "selfVideo", ["callerVideo"], loginSuccess, loginFailure);

Then the callback is 
function shouldAccept(otherGuy, acceptorCallback) {
    console.log('accepting...'+otherGuy);
    otherEasyrtcid = otherGuy;
    acceptorCallback(true);
}

But doesn't work at all, no log in the B's browser

Any ideas?

Eric Davies

unread,
Apr 21, 2015, 10:32:52 AM4/21/15
to eas...@googlegroups.com
Try:
    easyrtc.setSocketUrl("http://rot...:8080");
    //  easyrtc.setAcceptChecker(shouldAccept);
    easyrtc.setStreamAcceptor(run);

    easyrtc.enableDebug(false);
    easyrtc.enableDataChannels(true);
    easyrtc.setDataChannelOpenListener(openListener);
    easyrtc.setDataChannelCloseListener(closeListener);
    easyrtc.setPeerListener(addToConversation);

    easyrtc.enableAudio(false);
    easyrtc.setVideoDims(250,250);
    easyrtc.setRoomOccupantListener(convertListToButtons);
    easyrtc.easyApp("easyrtc.audioVideoSimple", "selfVideo", ["callerVideo"], loginSuccess, loginFailure);
    easyrtc.setAcceptChecker(shouldAccept);  // move to here.


EasyApp was intended for people to get quick very simple applications up (demos really), so it automates a lot of the stuff you would normally write for yourself, including supplying it's own accepChecker. However, if you call setAcceptChecker after calling easyApp, you'll override it's accept checker.

fernando vasquez

unread,
Apr 21, 2015, 8:09:06 PM4/21/15
to eas...@googlegroups.com
Thank you, it worked!!!!
Reply all
Reply to author
Forward
0 new messages