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)

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()\" />";
}
ixnx/wrtc/js/api/wrtc/onincomingcall.txt · Last modified: by tibor
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0