Agora cloud recording not starting

↘锁芯ラ 提交于 2020-12-13 03:27:30

问题


I am following Agora Cloud Recording RESTful apis

The problem is

  1. Acquire api working fine
  2. Start api working fine

Now query api is returning me

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

and stop api giving me

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

which means no one is present in channel. But 2 users are there in my ongoing channel

My start request was

{
    "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:


When using Agora's Cloud Recording service, the Recorder instance needs to have its own unique ID that it uses to join the channel and record the other users that are defined in the "subscribeVideoUids": portion of the request.

In the code snippet below first UID is meant to be unique for the Recorder to use to join the channel.This is not meant to be the UID for the user you wish to record.

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

if the user's UID is , "936239554" then the recorder should have a different/unique value even just adding an integer to the end "9362395541" is enough.

Im the "subscribeVideoUids" and "subscribeAudioUids" you'll want to include all the UID's of the users in the channel that you want to record. So if there are two users in the channel, include each UID as an element of the Array.

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


来源:https://stackoverflow.com/questions/62768432/agora-cloud-recording-not-starting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!