i am trying to recording both client and user conversation but succeeded client side user side sound not working i am using agora in flutter
agoraStartRecording(String cname, int uid, String token) async {
try {
await global.checkBody().then((result) async {
if (result) {
await apiHelper.agoraStartCloudRecording(cname, uid, token).then((result) {
log('start recording response:- ${result.recordList}');
global.agoraSid1 = result.recordList["sid"];
log('global agoraSId ${global.agoraSid1}');
});
}
});
} catch (e) {
print("Exception getAgoraResourceId:-" + e.toString());
}
}
and this is agora audio recording setup help me here pls what i am doing wrong in this i have successfully generated resouces key too every keys are generated there is no problem with keys so the only problem is for audio only client side audio is working and user side audio don’t know is mute or not recorded same for video too only client side video is working or visible and user video not in there
Future<dynamic> agoraStartCloudRecording(
String cname,
int local_uid,
String token,
) async {
log('agoraStartCloudRecording channel_name $cname and local_uid $local_uid and token
$token');
try {
final response = await http.post(
Uri.parse(
'https://api.agora.io/v1/apps/${agoraAppId}/cloud_recording/resourceid
/${global.agoraResourceId}/mode/mix/start'),
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"authorization": "Basic " +
base64.encode(utf8.encode(
"${agoraKey}:${agoraSecret}"))
},
body: json.encode({
"cname": "$cname",
"uid": "$local_uid",
"clientRequest": {
"token": "$token",
"storageConfig": {
"secretKey":
"${global.getSystemFlagValue(global.systemFlagNameList.googleSecretKey)}",
"vendor": 6,
"region": 0,
"bucket":
"${global.getSystemFlagValue(global.systemFlagNameList.googleBucketName)}",
"accessKey":
"${global.getSystemFlagValue(global.systemFlagNameList.googleAccessKey)}"
},
"recordingConfig": {
"channelType": 0,
"streamTypes": 2,
"audioProfile": 1,
"videoStreamType": 0,
"subscribeUidGroup": 0,
"streamType": ["hls", "mp4"]
}
}
}),
);
debugPrint('response of start recording 1${response.body}');
dynamic recordList;
if (response.statusCode == 200) {
recordList = json.decode(response.body);
} else {
recordList = null;
}
return getAPIResult(response, recordList);
} catch (e) {
debugPrint('Exception:- in agoraStartCloudRecording:- ' + e.toString());
}
}