let canvasId=`canvas-qr` return new Promise((resolve, reject) => { Taro.canvasToTempFilePath({ canvasId:canvasId, success(res3) { let tempFilePath = res3.tempFilePath; ctx.drawImage(tempFilePath,0,0,100,100); }, }); }); # 错误信息 VM3012 WAService.js:2 Unhandled promise rejection TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)' at CanvasRenderingContext2D.Nd.e.drawImage (VM3012 WAService.js:2) at Index._callee2$ (createImg.js?t=wechat&s=1632809999604&v=5bac26123f77e3efc63b8794d8360e6c:176) at m (vendors.js?t=wechat&s=1632809999604&v=6439fe6ae0559aecf05f9424f15122c6:1) at Generator.t._invoke (vendors.js?t=wechat&s=1632809999604&v=6439fe6ae0559aecf05f9424f15122c6:1) at Generator.e.<computed> [as next] (vendors.js?t=wechat&s=1632809999604&v=6439fe6ae0559aecf05f9424f15122c6:1) at step (createImg.js?t=wechat&s=1632809999604&v=5bac26123f77e3efc63b8794d8360e6c:26) at createImg.js?t=wechat&s=1632809999604&v=5bac26123f77e3efc63b8794d8360e6c:26 at VM3012 WAService.js:2 at n (VM3012 WAService.js:2)(env: macOS,mp,1.05.2105170; lib: 2.19.6)
canvas type=2d 获取的ctx 无法drawImage 地址为临时地址的图片https://developers.weixin.qq.com/miniprogram/dev/api/canvas/CanvasContext.drawImage.html
2021-09-282021年04月07日14:58:09
AudioContext什么时候支持createScriptProcessor?AudioContext什么时候支持createScriptProcessor, 还有createBuff,createBuffSource? 现在只能播放文件。
2021-04-07同问 同求
支持WEB-API里这些原生audiocontext吗因为要做音频分析可视化相关的功能,需要对播放的音频进行数据分析和处理,需要拿到缓冲区的原始数据,会调用audioContext.createAnalyser(),audioContext.createScriptProcessor()等方法,我看 wx.createInnerAudioContext()是没有这个能力的。请问有办法实现吗?[图片]
2021-04-07同问
小程序录音如何实时获取麦克风音量大小?如题:小程序录音时需要获取麦克风实时音量,该怎么去获取,好像没有相关的api
2021-04-06