Agora云记录未开始

时间:2020-07-07 05:02:10

标签: rest agora.io agora-web-sdk-ng

我正在关注Agora Cloud Recording RESTful apis

问题是

  1. 获取api正常运行
  2. 启动api可以正常工作

现在查询api返回了我

{
    "resourceId": "rid",
    "sid": "sid",
    "serverResponse": {
        "status": 4,
        "fileList": "",
        "fileListMode": "string",
        "sliceStartTime": 0
    }
}

并停止api给我

{
    "resourceId": "rid",
   "sid": "sid",
    "code": 435
}

表示通道中没有人。 但是我正在进行的频道中有2位用户

我的开始请求是

{
    "cname":"80f350442cb2a26ccacb5cfb058c6e82", 
    "uid":"936239554",       // userid who i want to record...is this correct????
    "clientRequest":{
         "token": "temp_token_generated_from_agora_console",
          "recordingConfig":{
            "channelType":0,
            "streamTypes":2,
            "audioProfile":1,
            "videoStreamType":0,
            "maxIdleTime":120,
            "transcodingConfig":{
                "width":360,
                "height":640,
                "fps":30,
                "bitrate":600,
                "maxResolutionUid":"1",
                "mixedVideoLayout":1
                }
            },
            "subscribeVideoUids": ["936239554"],    // is this correct?? 
            "subscribeAudioUids": ["936239554"],    //is this correct??
        "storageConfig":{
            "vendor":1,
            "region":14,
            "bucket":"my_bucket_name",
            "accessKey":"xxxx",
            "secretKey":"xxxx"
        }   
    }
} 

1 个答案:

答案 0 :(得分:0)

在使用Agora的Cloud Recording服务时,Recorder实例需要具有自己的唯一ID,该ID用于加入渠道并记录请求的"subscribeVideoUids":部分中定义的其他用户。

在下面的代码段中,第一个UID意味着Recorder可以唯一地加入频道,而不是您想要录制的用户的UID。

 "cname":"80f350442cb2a26ccacb5cfb058c6e82", "uid":"936239554", // userid who i want to record...is this correct????

如果用户的UID为"936239554",则记录器应该具有不同/唯一的值,即使仅在末尾"9362395541"加上一个整数就足够了。

"subscribeVideoUids""subscribeAudioUids"中,您要在要记录的频道中包括所有用户的UID。因此,如果频道中有两个用户,则将每个UID包含在数组中。

"subscribeVideoUids": ["936239554"],"subscribeAudioUids": ["936239554"],