wx.chooseImg & wx.chooseVideo 设置camera无效
设置 camera 属性没用,全是后置
chooseImgBack: function () { wx.chooseImage({ count: 1, sizeType: ['original'], sourceType: ['camera'], camera: 'back', success(res) { // tempFilePath可以作为img标签的src属性显示图片 const tempFilePaths = res.tempFilePaths } }) }, chooseImgFront: function () { wx.chooseImage({ count: 1, sizeType: ['original'], sourceType: ['camera'], camera: 'front', success(res) { // tempFilePath可以作为img标签的src属性显示图片 const tempFilePaths = res.tempFilePaths } }) }, chooseVideoBack: function () { wx.chooseVideo({ sourceType: ['camera'], maxDuration: 10, camera: 'back', success(res) { console.log(res.tempFilePath) } }) }, chooseVideoFront: function () { wx.chooseVideo({ sourceType: ['camera'], maxDuration: 30, camera: 'front', success(res) { console.log(res.tempFilePath) } }) }, |
