onFrame with pauseAnimation will clear canvas
qizhou23 opened this issue · comments
onFrame with pauseAnimation will clear canvas
onFrame和pauseAnimation一起用会清空画布
this.parser.load('../../static/asset/smash.svga', (videoItem) => {
this.player.setVideoItem(videoItem);
});
setTimeout( () => {
this.player.startAnimationWithRange({location: 0, length: 21})
this.player.onFrame((res) => {
if (res === 10) {
// canvas will clear in this step
this.player.pauseAnimation();
}
})
}, 1000)
- use import
- 导入方式:import
尝试把clearsAfterStop
设置为false再试试。