收藏
回答

PC端小程序canvas不支持drawImage使用SelectorQuery 获取的video对象

框架类型 问题类型 操作系统 工具版本
小程序 Bug Windows 1.0.6.2504030

官方文档的实例代码展示了 “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)'.>
最后一次编辑于  1天前
回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    1天前
    有用
登录 后发表内容