Table of Contents
onIncomingCall()
wrtc.onIncomingCall() is an event function called when an incoming call attempt is received, someone is calling you.
You must write your own wrtc.onIncomingCall() function to be able to answer incoming calls.
Usually your wrtc.onIncomingCall() function should notify user of incoming call (eg play a "telephone ringing" sound) and display Accept/Deny buttons.
Arguments
wrtc.onIncomingCall(obj)
- obj - call object that raised the event
Return value
Ignored.
Example
wrtc.onIncomingCall = function(obj) {
status.innerHTML = "Call from " + obj.getPartner() +
" <input type=\"button\" value=\"Answer\" onclick=\"" + obj.nam + ".answerCall()\" />" +
" <input type=\"button\" value=\"Deny\" onclick=\"" + obj.nam + ".denyCall()\" />";
}