initEnxRtc method
Implementation
Future<void> initEnxRtc() async {
_addEnxEventHandlers();
Map<String, dynamic> map = {
'minWidth': 320,
'minHeight': 180,
'maxWidth': 1280,
'maxHeight': 720
};
Map<String, dynamic> localInfo = {
'audio': true,
'video': true,
'data': true,
'framerate': 30,
'audioMuted': EnxSetting.instance.isConfirmation?isSelected.first:EnxSetting.instance.isAudioMute,
'videoMuted': EnxSetting.instance.isConfirmation?isSelected[1]:EnxSetting.instance.isVideoMute,
'videoSize': map,
'audio_only': EnxSetting.instance.isConfirmation
? isSelected[2]
: EnxSetting.instance.isAudioOnlyCalls,
'isVideoResolution': true
};
Map<String, dynamic> playerConfig = {
'bandwidth': true,
'screenshot': true,
'avatar': true,
'pinned': true,
'iconHeight': 25,
'iconWidth': 25,
// "iconColor": '#ffffff'
};
Map<String, dynamic> roomInfo = {
'allow_reconnect': true,
'number_of_attempts': 3,
'timeout_interval': 45,
'playerConfiguration': playerConfig,
'forceTurn': false,
'chat_only': false
};
// bool isPermissionGranted =
// await handlePermissionsForCall(context);
//if (isPermissionGranted) {
print("localInfo $localInfo roomInfo $roomInfo");
await EnxRtc.joinRoom(token, localInfo, roomInfo, List.empty());
// }
}