尽管响应成功,但Agora Cloud Recording仍无法记录

时间:2020-11-12 08:51:10

标签: javascript angular agora.io

这个问题类似于this,但是由于我没有足够的评论要点,因此我提出了一个新主题。

这就是我所谓的agora API的方式:

  1. https://api.agora.io/v1/apps/{myAppID}/cloud_recording/acquire返回200,然后
{"resourceId": "{myResourceId}"}
  1. https://api.agora.io/v1/apps/{myAppID}/cloud_recording/resourceid/{myResourceId}/mode/mix/start返回200,然后
{"resourceId":"{myResourceid}","sid":"{mySID}"}
  1. 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
  }
}
  1. https://api.agora.io/v1/apps/{myAppID}/cloud_recording/resourceid/{myResourceId}/mode/mix/stop返回200(如果调用 maxIdleTime,则返回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

0 个答案:

没有答案