libpag icon indicating copy to clipboard operation
libpag copied to clipboard

开发者工具能正常播放动画,但真机调试时报错,PAGInit fail! Please check .wasm file path valid.

Open Hugohui opened this issue 1 year ago • 1 comments

【版本信息】

4.2.82

【平台信息】

微信小程序

【预期的表现】

开发者工具预览正常 image

【实际的情况】

真机调试报错 image

【Demo及附件】

const PAG = await PAGInit({ locateFile: file => { console.log('locateFile=====', file) return '/static/' + file } }) wx .createSelectorQuery() .in(this) .select('#pagPlayer') .fields({ node: true, size: true }, () => {}) .exec(async res => { const canvas = res[0].node const buffer: any = await pagUtil.loadFileByRequest( 'https://static-growth.diffusenetwork.com/FE/pags/%E8%87%B3%E5%B0%8A.pag' ) const pagFile = await PAG.PAGFile.load(buffer) const pagView: any = await PAG.PAGView.init(pagFile, canvas) pagView.play() })

Hugohui avatar Mar 05 '24 02:03 Hugohui

上述代码我本地用4.2.82包验证可以正常进行真机调试,是否可以上传一个可复现问题的完整demo

jinwuwu001 avatar May 27 '25 09:05 jinwuwu001