Hi Eric,
Thank you for answering!
I have a suggestion for the API. Bear in mind though that I am not familiar with the WebRTC mindset. I have developed SIP clients for a number of years, the following comes from my experience there.
How about the easyrtc.call() function "returns" a session object in one of the callbacks? That session object would then hold functions such as "session.addVideo()", "session.removeVideo()", "session.addScreenCapture()", "session.removeScreenCapture()", etc. The session object can be extended with functions such as "session.muteAudio()", "session.unmuteAudio()", "session.muteVideo()", "session.hold()", "session.setPresenceStatus()", "session.sendMessage()", etc. Finally, it would also hold functions for "session.hangup()" or even "session.forward(othereasyrtc)". Since both clients in the call have a corresponding session objects, it would also accept callback functions such as "session.onVideoAdded(function(){})", etc.
To build support for conferencing into easyrtc, one could have an additional method called "easyrtc.conference()" which would then return an object "conferenceSession" with similar functionality. "conferenceSession" would then also allow to "conferenceSession.addSession(session)", etc, for fine control of the conference.
About your suggestion regarding how to toggle video and screen capture streams within a call: I fiddle around and report back if I find a nice solution.
Thanks again for your great support!
Fabian