小程序做相机方向切换,第一次的切换的时候在真机上会卡屏?
< camera wx:elif = "{{isCameraFont}}" flash = "off" class = "camera" device-position = "front" binderror = "error" bindinitdone = "onCameraInitDone" ></ camera > < camera wx:elif = "{{!isCameraFont}}" flash = "off" class = "camera" device-position = "back" binderror = "error" bindinitdone = "onCameraInitDone" ></ camera > < cover-image class = "device-position-change-btn" src = "../../image/ic-camera.png" bindtap = "changeDevicePosition" ></ cover-image > |
changeDevicePosition(){ this .setData({ isCameraFont: ! this .data.isCameraFont }) }, |
功能就是点击翻转的按钮可以更改摄像头的方向,但是第一次从翻转camera组件会卡住,请看图片:
2 回复
麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)