call method
Implementation
@override
Future<ActionCallback> call(
String userId, String type, OfflinePushInfo? offlinePushInfo) async {
if (!isOnCalling) {
// 首次拨打电话,生成id,并进入trtc房间
mCurRoomID = _generateRoomID();
mCurCallType = type;
_enterTRTCRoom();
}
mCurInvitedList.add(userId);
V2TimValueCallback res = await timManager.getSignalingManager().invite(
invitee: userId,
data: jsonEncode(getCustomMap()),
timeout: timeOutCount,
offlinePushInfo: offlinePushInfo,
onlineUserOnly: false);
if(res.code == 0){
mCurCallID = res.data;
mCurCallList.add({'userId': userId, 'callId': mCurCallID});
return ActionCallback(code: res.code, desc: res.desc);
}
return ActionCallback(code: res.code, desc: res.desc);
}