简体   繁体   English

在opentok java sdk v4.3.0中开始存档导致400(错误请求)

[英]Start archiving in opentok java sdk v4.3.0 results in 400 (Bad Request)

I am using tokbox opentok project for publishing and subscribing video camera and also archiving them. 我正在使用tokbox opentok项目发布和订阅视频摄像头并归档它们。 I was using opentok-java-sdk v2.3.2 in which everything was working fine until I changed the sdk version. 我正在使用opentok-java-sdk v2.3.2,其中一切正常,直到我更改了sdk版本。 Now I have changed the sdk version to 4.3.0. 现在我已将sdk版本更改为4.3.0。 which is resulting in start archiving failure. 这导致开始归档失败。
It gives me the following error: 它给了我以下错误:

com.opentok.exception.RequestException: Could not start an OpenTok Archive. A bad request, check input archive properties like resolution etc.
    at com.opentok.util.HttpClient.startArchive(HttpClient.java:259)
    at com.opentok.OpenTok.startArchive(OpenTok.java:445)
    at com.abc.web.utils.OpenTokSdkUtils.startRecording(OpenTokSdkUtils.java:99)

If anyone could help me out with this. 如果有人能帮我解决这个问题。 That would be really appreciated. 真的很感激。
Edit:- I am following this code from the opentok guide for java sdk 编辑: -我正在从java sdk的opentok指南中关注此代码

import com.opentok.Archive;
import com.opentok.ArchiveProperties;

Archive archive = opentok.startArchive(sessionId, new ArchiveProperties.Builder()
  .archiveMode(Archive.OutputMode.INDIVIDUAL)
  .build());

// Store this archiveId in the database for later use
String archiveId = archive.getId();

But this has a problem with ArchiveBuilder as archive builder has no method name archiveMode, so I used the outputMode which I was using previously. 但这存在ArchiveBuilder的问题,因为存档构建器没有方法名称archiveMode,所以我使用了之前使用的outputMode。
After changes:- 变更后: -

Archive archive = opentok.startArchive(sessionId, new ArchiveProperties.Builder()
                      .outputMode(Archive.OutputMode.INDIVIDUAL).name(username)
                      .build());

TokBox Developer Evangelist here. TokBox Developer Evangelist在这里。

It looks like the OpenTok Java SDK is attempting to add a layout even when the outputMode is set to Archive.OutputMode.INDIVIDUAL . 即使outputMode设置为Archive.OutputMode.INDIVIDUALOpenTok Java SDK也会尝试添加布局。 I've gone ahead and filed a bug in the SDK repo so you can track the patch release. 我已经继续并在SDK repo中提交了一个错误 ,因此您可以跟踪补丁发布。

Please check out the API docs for more information on archiving: https://tokbox.com/developer/rest/#start_archive 有关存档的更多信息,请查看API文档: https//tokbox.com/developer/rest/#start_archive

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM