acceptCall method
Implementation
@override
Future<void> acceptCall([Map<String, String>? userInfo]) async {
setState(RTCSessionState.RTC_SESSION_CONNECTING);
cubeSdp.userInfo = userInfo;
channels.forEach((opponentId, peerConnection) {
CubeUser? currentUser = CubeChatConnection.instance.currentUser;
if (opponentId == callerId) {
peerConnection.startAnswer();
} else if (opponentId < currentUser!.id!) {
peerConnection.startOffer();
} else if (peerConnection.hasRemoteSdp()) {
peerConnection.startAnswer();
}
});
}