acceptCall(接听呼叫)
接口描述
收到呼入事件后,可使用该接口接听呼叫 。
注意事项
收到呼入事件。
方法定义
OpenEyeCall.prototype.acceptCall = function(callid, is_video_call, callbacks)
参数描述
|
参数名 |
类型 |
可选/必选 |
描述 |
|---|---|---|---|
|
callid |
Number |
必选 |
呼叫ID,由上onCallIncoming上报。 |
|
is_video_call |
Number |
必选 |
是否为视频呼叫,由onCallIncoming上报。 |
|
callbacks |
必选 |
回调方法。 |
回调方法的入参示例:
{
"description" : "tsdk_accept_call",
"result" : 0,
"rsp" : 67538
}
使用示例
function acceptCall() {
global_openEye_SDK.openEyeCall.acceptCall(1917517824, 0, { response: onAcceptCallReponse });
}
function onAcceptCallReponse(data) {
if (data.result == 0) {
console.error("AcceptCall success. ");
} else {
console.error("AcceptCall failed. The ErrorCode is " + data.result);
console.info(data);
}
}