Table of Contents

answerCall()

call.answerCall() is used to answer an incoming call request, to "pick up the phone when it is ringing".

Arguments

call.answerCall(sendVideo)

Returns

Nothing.

Events

wrtc.answerCall() raises event wrtc.onConnecting()

Example

When answering a call it is important to call answerCall() of the correct call object. Usually an "Answer" button is displayed by wrtc.onIncomingCall() function and when user klicks on the button answerCall() is called. To be able to call answerCall() of the correct call object you need to use the call.nam property:

wrtc.onIncomingCall = function(call) {
    ...
    stus.innerHTML = "<input type=\"button\" value=\"Answer\" onclick=\"" + call.nam + ".answerCall()\" />";
    ...
}

Also See

call.nam

wrtc.onIncomingCall()

call.setSendVideo()