mpflutter / mpflutter_wechat_api

Other
2 stars 2 forks source link

cameraContext.onCameraFrame回调结果格式异常 #4

Closed cl549723678 closed 3 months ago

cl549723678 commented 3 months ago

QQ截图20240829193126 Screenshot_2024-08-29-19-30-02-896_com tencent mm

var cameraContext = wx.createCameraContext(); cameraFrameListener = cameraContext.onCameraFrame((result) { try { buffer.write("onCameraFrame:${result.width},${result.height}\n"); update(); } catch (e) { buffer.write("error:${e.toString()}\n"); update(); } }); CameraFrameListenerStartOption? cameraFrameListenerStartOption = CameraFrameListenerStartOption() ..success = (result) { buffer.write("success:${result.errMsg}\n"); update(); } ..complete = (result) { buffer.write("complete:${result.errMsg}\n"); update(); }; cameraFrameListener?.start(cameraFrameListenerStartOption);

mpflutter版本: mpflutter_core: ^2.7.0 mpflutter_build_tools: ^2.7.1 mpflutter_wechat_api: ^2.2.3 flutter版本:3.22.1 操作系统:windows10 IDE:androidstudio 微信基础库版本:3.1.4

在onCameraFrame回调中使用result.width便报错