stopCall method
dynamic
stopCall(
- dynamic mcToken
Implementation
stopCall(mcToken) {
if (kIsWeb) {
print("this is stop call in sdk $mcToken");
Map<String, dynamic> jsonData = {
"type": "request",
"requestType": "session_cancel",
"requestId": _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!),
"sessionUuid": callSessionUUID,
"mcToken": mcToken
};
print("kdfhdjfkghfjg86875 $jsonData");
_socket?.send(jsonData);
} else {
if (Platform.isIOS && screenShareflag) {
print("here in.........");
Map<String, dynamic> jsonData = {
"type": "request",
"requestType": "session_cancel",
"requestId": _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!),
"sessionUuid": callSessionUUID,
"mcToken": mcToken
};
print("call session ends $jsonData");
_socket?.send(jsonData);
print("after senddddd");
ReplayKitLauncher.launchReplayKitBroadcast('ScreenShare');
} else {
print(
"this is stop call in sdk $mcToken $callSessionUUID $screenSessionUUID $ismultisession");
if (ismultisession) {
Map<String, dynamic> jsonData = {
"type": "request",
"requestType": "session_cancel",
"requestId": _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!),
"sessionUuid": callSessionUUID,
"mcToken": mcToken
};
print("call session ends $jsonData");
_socket?.send(jsonData);
print("after senddddd");
Map<String, dynamic> jsonData1 = {
"type": "request",
"requestType": "session_cancel",
"requestId": _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!),
"sessionUuid": screenSessionUUID,
"mcToken": mcToken
};
print("screeen session ends $jsonData1");
_socket?.send(jsonData1);
print("after senddddd");
} else {
Map<String, dynamic> jsonData = {
"type": "request",
"requestType": "session_cancel",
"requestId": _generateMd5(
DateTime.now().millisecondsSinceEpoch.toString() +
tenantID +
ref_id!),
"sessionUuid": callSessionUUID,
"mcToken": mcToken,
};
print("kdfhdjfkghfjg657657 $jsonData");
_socket?.send(jsonData);
print("after senddddd");
}
}
}
}