Agora 复合录制开始 returns 空 sid

Agora Composite Recording start returns empty sid

当我尝试开始复合录制时,它returns空sid导致无法开始录制。 当我尝试单独录制时,它工作正常。

我是不是漏掉了什么?

这是我的代码:

func startRecording() {
        
        let body : [String : Any] = [
            "uid": uid,
            "cname": channelName,
            "clientRequest": [
                "token": token(),
                "recordingConfig": [
                    "maxIdleTime": 30,
                    "streamMode": "standard",
                    "streamTypes": 2,
                    "channelType": 0,
                    "subscribeUidGroup": 1
                ],
                "storageConfig": [
                    "secretKey": MyAWS.secretKey,
                    "vendor": 1,
                    "bucket": MyAWS.buketName,
                    "accessKey": MyAWS.accessKey,
                    "region": 10,
                    "fileNamePrefix": [
                        channelName
                    ],
                    "extensionParams": [
                        "sse":"kms"
                   ]
                ]
            ]
        ]
        AF.request("https://api.agora.io/v1/apps/\(KeyCenter.AppId)/cloud_recording/resourceid/\(resourceId)/mode/mix/start",
                      method: .post,
                      parameters: body,
                      encoding: JSONEncoding.default,
                        headers: headers)
            .authenticate(username: username, password: password)
            .responseDecodable(of: CloudRecordingStartedResp.self, completionHandler: { response in
                print("cloud_recording.start")
                switch response.result {
                case .success(let data):
                    print("resourceId:\(data.resourceId)\nsid:\(data.sid)")
                    self.sid = data.sid
                case .failure(let error):
                    let str: String? = String(data: response.data!, encoding: .utf8)
                    print("error:\(error)\ndata:\(str)")
                }
        })
    }

提前致谢。

streamMode 是不必要的。 删了,就成功了!