joinCall method

void joinCall({
  1. required String callId,
  2. bool videoCall = false,
  3. bool videoOnStart = false,
  4. String? callerName,
  5. String? calleeName,
  6. dynamic completion()?,
})

Implementation

void joinCall({required String callId, bool videoCall = false, bool videoOnStart = false, String? callerName, String? calleeName, Function()? completion}) async {
  final currentCallId = _getCurrentCallId();
  if (currentCallId != null && currentCallId.isNotEmpty) {
    return;
  }
  _isVideoCall = videoCall;
  _videoOnStart = videoOnStart;
  _currentCallUserInfo?.clear();
  _currentCallUserInfo =
  {"callId": callId, "callerName": callerName, "calleeName": calleeName};
  await fetchIceConfig();
  await _initWebRtcClient(true);

  await _initVideoRender();
  _addStep(step: "joinCall");
  _joinCallChannel(callId: callId, completion: completion);
}