官方没人?
小程序video标签在pc端上无法全屏这是线上用户反馈的问题。我们根据用户指引,能够再现此问题。 先说一下现象: 1.使用video标签,全屏播放,在pc端小程3.4.1上面全屏后,画面无法铺满整个屏幕。 2.mac 3.4.0和mac3.3.1的微信版本是正常的,可以铺满全屏。 以上测试均是在同一台mac机器上测试,mac系统版本信息如下: [图片] 测试代码片段如下: https://developers.weixin.qq.com/s/TDcme2mO7TAo 问题拍摄视频如下: https://hs-schedule-1302770967.cos.ap-chengdu.myqcloud.com/test/20220602_test/%E9%A3%9E%E4%B9%A620220615-171239.mp4
2022-06-21样式问题
小程序用canvas做手写签名的时候wx.canvasToTempFilePath在安卓端报错?安卓端报错canvasToTempFilePath:fail height is 0 但是ios端是正常的。 wxml代码: <view class="signature"> <view class="text">安全须知确认签字:</view> <view class="text">本人已经阅读相应安全告知,并对本次进港人员进行了传达。</view> <view class="start" bindtap="showSignature" wx:if="{{ !imgUrl }}">点击签名</view> <van-image width="{{ windowWidth }}" height="200" wx:if="{{ imgUrl }}" src="{{ imgUrl }}"/> </view> <van-popup show="{{ signatureShow }}" position="bottom" bind:close="onSignatureClose"> <view class="signName"> <canvas id="canvas" type="2d" class="canva" bindtouchstart="canvasStart" bindtouchmove="canvasMove" bindtouchend="canvasEnd" touchcancel="canvasEnd" binderror="canvasIdErrorCallback" style="width: {{windowWidth}}px; height: 200px;"></canvas> </view> <view style="padding: 10px;"> <view style="display: flex;justify-content: center;align-items: center;"> <van-button type="primary" bind:click="uploadImg">确认签名</van-button> <van-button type="warning" bind:click="cleardraw">清除签名</van-button> </view> </view> </van-popup> js代码: // 点击“点击签名”按钮的时候弹出签名popup,随后初始化Canvas showSignature: function() { wx.setStorageSync('draw', false) let that = this this.setData({ signatureShow: true }) setTimeout(function () { that.initCanvas() }, 500) }, // 初始化 initCanvas() { const query = wx.createSelectorQuery() query.select('#canvas') .fields({ node: true, size: true }) .exec((res) => { console.log(res[0]) // 此处输出:{width: 375, height: 200, nodeCanvasType: "2d", node: {id: 97167}} const canvas = res[0].node this.setData({ canvas: canvas }) context = canvas.getContext('2d') context.fillStyle = '#FFFFFF' context.strokeStyle = '#444' context.lineWidth = 4 context.lineCap = 'round' context.lineJoin = 'round' //设置width和height手写位置才不会发生偏移 canvas.width = wx.getSystemInfoSync().windowWidth canvas.height = 200 }) }, // 保存签名图片 uploadImg() { var that = this var draw = wx.getStorageSync('draw') if (!draw) { Toast('请完成签名!') return } wx.canvasToTempFilePath({ x: 100, y: 200, width: wx.getSystemInfoSync().windowWidth, height: 200, destWidth: wx.getSystemInfoSync().windowWidth, destHeight: 200, canvas: this.data.canvas,//画布标识,传入 canvas 组件实例 (canvas type="2d" 时使用该属性)。 success(res) { // 此处省略的上传图片到服务器的代码 that.setData({ signatureShow: false }) //关闭签名popup }, fail(err) { console.log(err) // 此处输出报错内容:canvasToTempFilePath:fail height is 0 wx.showModal({ title: '提示', content: err.errMsg, showCancel: false }) } }) }
2022-06-17复现步骤:搜索【观鱼学堂】小程序,点击【每日一画】,进入页面会自动播放视频,点击【全屏】按钮即可复现。
PC端小程序使用video播放视频无法全屏拍了视频链接: https://hs-schedule-1302770967.cos.ap-chengdu.myqcloud.com/test/20220602_test/1655189526134933.mp4 说明:mac 3.4.0和mac3.3.1的微信版本是正常的,可以铺满全屏。
2022-06-14