static startRecording = async (resourceId, channelName, idsToUse) => {
let startDateTime = Date.now();
console.log("Total ID USER MAP Time = " + (Date.now() - startDateTime) / 1000);
try {
const request = {
uid: '999',
cname: `${channelName}`,
clientRequest: {
token: EventService.getRecordingToken(channelName),//tocken of 999
recordingConfig: {
maxIdleTime: 120,
streamTypes: 2,
channelType: 0,
videoStreamType: 0,
subscribeVideoUids: [idsToUse.uId + ""],
subscribeAudioUids: [idsToUse.uId + ""],
subscribeUidGroup: 0
},
recordingFileConfig: {
avFileType: ["hls"]
},
storageConfig: {
accessKey: "ACCESS KEY",
region: 0,//The region parameter has no effect, whether or not it is set.(Ref:https://docs.agora.io/en/cloud-recording/cloud_recording_api_rest?platform=RESTful)
bucket: `azure-recordings/${channelName}`,
secretKey: "SECRET KEY",
vendor: 5
}
}
};
console.log("agoraApiCallConfig", agoraApiCallConfig);
console.log("req", request);
const requestUrl = `${AgoraBaseUrl}/v1/apps/${AgoraAppID}/cloud_recording/resourceid/${resourceId}/mode/individual/start`;
const start = Date.now();
console.log("req--", requestUrl);
const response = await axios.post(requestUrl, request, agoraApiCallConfig);
const stop = Date.now();
const elapsed = stop - start;
//console.log("Total Start Recording Time = " + elapsed / 1000);
console.log("response.data", response.data);
if (response.status == 200 || response.status == 201) {
return response.data;
}
log(response.data, "error");
throw Error("Recording starting failed with status code: " + response.status);
} catch (e) {
appInsightLogHelper.trackException(e, 4);
throw e;
}
};
this is my code for recording and storing data in azure can anyone guide me why the data is not moving in azure? I am going live on my app and then I try to record that live with a bot user and then store that in blob service in azure storage container.