官方文档的实例代码展示了 “video 画到 2D Canvas 示例”,但是pc端不支持
文档地址:https://developers.weixin.qq.com/miniprogram/dev/api/canvas/RenderingContext.html
PC端真机预览和真机调试都不支持canvas的rawImage方法使用SelectorQuery 获取的video对象
开发工具和手机端都支持
pc端无法绘制video
pc操作系统 win10 pc微信版本146.84.17 基础库版本3.10.2
使用try catch拦截 drawImage 的异常信息时 pc端会提示以下信息,canvas使用的是页面canvas,并不是离屏canvas
<TypeError: Failed to execute 'drawImage' on 'OffscreenCanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.>