Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ios 调用snapshotVideo报错 #59

Open
lancexin opened this issue Sep 27, 2022 · 2 comments
Open

ios 调用snapshotVideo报错 #59

lancexin opened this issue Sep 27, 2022 · 2 comments

Comments

@lancexin
Copy link

lancexin commented Sep 27, 2022

【当前现象】:如:进房失败,提示错误码xxxx

【问题时间段】:2019-09-01 16:23~16:55
【机型】:iphone xr ,ios16
【之前版本有无此问题】:tencent_trtc_cloud-2.3.4 tencent_trtc_cloud-2.3.8 均有问题
【是否必现】:必现
【复现方法】:

return TRTCCloudVideoView(
      key: const ValueKey("_bigVideoViewId"),
      viewType: TRTCCloudDef.TRTC_VideoView_TextureView,
      onViewCreated: (viewId) async {
        controller.bigVideoViewId = viewId;
        controller.openCamera();
      },
    );


  Future startCapturePicture() async {
    String path = Services.system.getCacheFilePath(
        "${Utils.getNowTimeFmt(Utils.yyyyMMddhhmmssSSS)}.jpg");

    final Completer _completer = Completer();

    void _listener(type, params) {
      if (type == InterviewEvent.onSnapshotComplete) {
        _completer.complete(params);
      }
    }

    _interview.registerListener(_listener);
    await _interview.mTRTCCloud
        .snapshotVideo(null, TRTCCloudDef.TRTC_VIDEO_STREAM_TYPE_BIG, path);
    final result = await _completer.future;
    _interview.unRegisterListener(_listener);

    if (result["errCode"] == 0) {
      bool find =
          await HmCameraViewController.shared.findFace(result["path"]) ?? false;
      if (find) {
        Get.showNotice(message: "find face");
      } else {
        Get.showNotice(message: "not find face");
      }
    }
    Log.d("$result");
  }
}

调用startCapturePicture() 程序崩溃
【日志或者描述、截图】:
iShot_2022-09-27_10 43 33
iShot_2022-09-27_10 45 24

@c1avie
Copy link
Collaborator

c1avie commented Sep 28, 2022

是有这个问题,可以先传入本地的用户id解决哈

@c1avie
Copy link
Collaborator

c1avie commented Sep 28, 2022

传空字符串 “”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants