收藏
回答

xr-camera 人脸识别面具拍照。ios 正常返回base64, 安卓手机拍没有画面(蓝地图)?

<ar-face wx:if="{{showCamera}}" width="{{renderWidth}}" height="{{renderHeight}}" style="width:{{width}}px;height:100vh" />

拍照JS

share.captureToDataURL(options);
    if (res && res.includes('base64')) {
      this.setData({
        imageUrl: res,


问题描述:苹果手机戴面具拍照正常返回base64,图片展示正常;换安卓手机拍照正常返回base64,但是在image展示的是一张蓝色底图,不是拍的照片。

安卓拍照后效果:

如果在安卓下我把 height="{{renderHeight}}" 修改为 height= {{renderHeight - 400}},则拍照后返回的base64,是正常的照片。


ar-face 组件是小程序开发者文档里的戴面具demo一样的代码。renderHeight 是通过

wx.getSystemInfoSync() 拿到的高度及pixelRatio值得到的。


什么情况会导致这个问题???





回答关注问题邀请回答
收藏
登录 后发表内容