joinRoom method
Future<void>
joinRoom(
{ - required String roomId,
- required int participantId,
})
override
Implementation
@override
Future<void> joinRoom({
required String roomId,
required int participantId,
}) async {
await Future.wait([
_frameCryptor.initialize(roomId, codec: _callSetting.preferedCodec),
_prepareMedia(),
]);
if (_mParticipant?.peerConnection == null) return;
if (WebRTC.platformIsMobile) {
if (WebRTC.platformIsIOS) {
await Helper.setAppleAudioIOMode(
AppleAudioIOMode.localAndRemote,
preferSpeakerOutput: true,
);
}
await toggleSpeakerPhone(forceValue: true);
}
_roomId = roomId;
_participantId = participantId.toString();
await _establishBroadcastConnection();
_nativeService.startCallKit(roomId.roomCodeFormatted);
}