开发者工具能正常播放动画,但真机调试时报错,PAGInit fail! Please check .wasm file path valid.
Open
@kevingpqi123 is already working on this.
Since Mar 5, 2024.
- Dominant language
- HTML
- Stars
- 5.8k
- Forks
- 531
- Avg merge
- 8d 55m
- Merged PRs (30d)
- 17
Description
【版本信息】
4.2.82
【平台信息】
微信小程序
【预期的表现】
开发者工具预览正常
【实际的情况】
真机调试报错
【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()
})
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.