acceptCall method
void
acceptCall(
{ - dynamic completion(
- bool
)?,
})
Implementation
void acceptCall({Function(bool)? completion}) async {
final microphoneStatus = await Permission.microphone.request();
final deviceId = await _getDeviceId();
_addStep(step: "acceptCall", data: {"microphone": microphoneStatus.isGranted, "deviceId":deviceId});
if (microphoneStatus.isGranted == false) {
final callback = completion;
if (callback != null) {
callback(false);
}
} else {
final callback = completion;
if (callback != null) {
callback(true);
}
_callAccepted = true;
_addDelegateEvent(name: kNotiWebRtcConfOnConnecting);
_sendCallReady();
}
}