startCallOneToOne method
dynamic
startCallOneToOne({})
Implementation
startCallOneToOne(
{String? from,
Map<String, dynamic>? customData,
List<String>? to,
String? mediaType,
String? mcToken,
String? callType,
String? sessionType}) async {
screenShareflag = false;
try {
userType = "caller";
isCallInProgress = true;
startCallObject = {"mediaType": mediaType, "sessionType": sessionType};
callend = false;
print("i am here in start call oneto one");
starttime = DateTime.now();
iscallonetoone = true;
callSessionUUID = _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!);
onetooneparticipantrefid = to![0].toString();
_peerConnection = await _createPeerConnectiononetoone(mediaType!);
print(
"this is peerconnection $_peerConnection $from!, $to, mediaType, callType!, sessionType!, customData!");
_createOfferonetoone(
from!, to, mediaType, callType!, sessionType!, customData!);
} catch (e) {
print("this is error in start call one2one $e");
}
onCallDial?.call();
// } else {
// print("permissions not granted");
// }
}