**按照官方文档配置了 ffavc 的软解,但是微信端依然无法自动播放** <img width="1003" alt="image" src="https://github.com/user-attachments/assets/baa66e94-db09-4daf-ae03-46e8200e965b" /> --- ```js const event = new Event("PAGInitReady"); async function initPag(event) { window.PAG = await window.libpag.PAGInit(); // Initialize ffavc webassembly module. const FFAVC = await window.ffavc.FFAVCInit(); const ffavcDecoderFactory = new FFAVC.FFAVCDecoderFactory(); PAG.registerSoftwareDecoderFactory(ffavcDecoderFactory); window.dispatchEvent(event); } window.onload = async () => { await initPag(event); } ``` ```js // 清除上一个 PAG 相关的资源 if (this.pagFile) { this.pagFile.destroy(); } if (this.pagView) { this.pagView.destroy(); } // 获取 PAG 素材数据 const buffer = await fetch(this.configurationData.pagFile?.url || DEFAULT_PAG_FILE) .then(response => response.arrayBuffer()); // 加载 PAG 素材为 PAGFile 对象 this.pagFile = await this.pagInstance.PAGFile.load(buffer); // 动效文件的高/宽比 this.pagWidth = this.pagFile.width() ?? 0; this.pagHeight = this.pagFile.height() ?? 0; this.pagHWRatio = this.pagHeight / this.pagWidth; this.calcPagCanvasSize(); // 实例化 PAGView 对象 // 由于 VideoReader 模块在 Web 平台依赖于 VideoElement,所以在部分移动端场景下,pagView?.init 不是在用户交互产生的调用链中,可能会存在不允许播放导致无法正常渲染画面的问题。 // 当出现这种情况,我们推荐取消首帧渲染 this.pagView = await this.pagInstance.PAGView.init(this.pagFile, this.pagCanvas, { firstFrame: false, useScale: false, }); // 设置动画循环播放次数:0 代表无限循环 this.pagView.setRepeatCount(this.configurationData.repeatCount || 0); // 播放 PAGView await this.pagView.play(); ```  <img width="710" alt="image" src="https://github.com/user-attachments/assets/20e08d03-90cb-4d64-9b7c-e88a39211aec" /> <img width="938" alt="image" src="https://github.com/user-attachments/assets/4d664f83-03ab-46ff-b82d-b332a75a7346" /> <img width="719" alt="image" src="https://github.com/user-attachments/assets/e41d5c00-54e0-4e0d-bb8d-7b6cb8591906" />
按照官方文档配置了 ffavc 的软解,但是微信端依然无法自动播放
