这个问题类似于this,但是由于我没有足够的评论要点,因此我提出了一个新主题。
这就是我所谓的agora API的方式:
https://api.agora.io/v1/apps/{myAppID}/cloud_recording/acquire
返回200,然后{"resourceId": "{myResourceId}"}
https://api.agora.io/v1/apps/{myAppID}/cloud_recording/resourceid/{myResourceId}/mode/mix/start
返回200,然后{"resourceId":"{myResourceid}","sid":"{mySID}"}
https://api.agora.io/v1/apps/{myAppID}/cloud_recording/resourceid/{myResourceID}/mode/mix/query
返回200(我注意到fileList为空),并且{
"resourceId": "{myResourceId}",
"sid": "{mySID}",
"serverResponse": {
"status": 4,
"fileList": "",
"fileListMode": "string",
"sliceStartTime": 0
}
}
https://api.agora.io/v1/apps/{myAppID}/cloud_recording/resourceid/{myResourceId}/mode/mix/stop
返回200(如果调用{"resourceId":"{myResourceId}","code":435}
我的起始有效载荷是这样的:
const recordingPayload = {
"cname": client.cname,
"uid": String(client.uid), //get from callback API .join
"clientRequest": {
"token": client.token_agora, // generated by my project API
"recordingConfig": {
"maxIdleTime": 60,
"streamTypes": 2,
"channelType": 0,
"videoStreamType": 0,
"transcodingConfig": {
"height": 640,
"width": 360,
"bitrate": 500,
"fps": 15,
"mixedVideoLayout": 1,
"backgroundColor": "#FF0000"
}
},
"recordingFileConfig": {
"avFileType": [
"hls"
]
},
"storageConfig": {
"accessKey": this.agoraConfig.storage.accessKey, // S3 configuration
"region": 9, // S3 configuration
"bucket": this.agoraConfig.storage.bucket, // S3 configuration
"secretKey": this.agoraConfig.storage.secretKey, // S3 configuration
"vendor": 1, // S3
"fileNamePrefix": [
"image",
"video"
]
}
}
}
我的有效载荷有问题吗? 即使我在频道上,agora似乎也会检测到我闲置
我已经尝试过爱马仕(Hermes)解决方案here,但是当我调用start
API时却出现了错误400