RTCall/README.md
Now, RTCMultiConnection-v1.4 and upper releases supports admin/guest features; so RTCMultiConnection.js is preferred.
Why RTCall.js?
The entire process is browser to browser.
=
<script src="https://www.webrtc-experiment.com/RTCall.js"></script>
=
Remember: All lines are optional!
call = new RTCall();
=
onincomingcallonincomingcall fires each time if someone calls you:
call.onincomingcall = function(caller) {
call.receive(caller.receiverid);
};
=
oncustomeroncustomer is fired only for admin:
call.oncustomer = function(customer) {
call.call(customer.callerid);
};
=
onstreamonstream returns remote media stream:
call.onstream = function(e) {
// e.stream ---- remote media stream object
// e.callerid ---- id of the remote person
audio = e.audio;
audio.play(); // "e.audio" object is paused by default
document.documentElement.appendChild(audio);
};
=
initinitializing RTCall object:
call.init();
=
Admin can call customers using their caller-ids. Remeber, customers caller-ids are always passed over oncustomer method:
call.oncustomer = function(customer) {
call.call(customer.callerid);
};
Customers can call the admin too; using admin's caller-id:
call.call('admin-caller-id');
=
receivereceiver-id is always passed over onincomingcall:
call.onincomingcall = function(caller) {
call.receive(caller.receiverid);
};
=
adminBy default: admin is false:
call.admin = true;
=
=
RTCall.js supports following browsers:
| Browser | Support |
|---|---|
| Firefox | Stable / Aurora / Nightly |
| Google Chrome | Stable / Canary / Beta / Dev |
| Android | Chrome Beta |
=
RTCall.js is released under MIT licence . Copyright (c) 2013 Muaz Khan.