Open qizhou23 opened 5 years ago
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)
尝试把clearsAfterStop设置为false再试试。
clearsAfterStop
onFrame with pauseAnimation will clear canvas
onFrame和pauseAnimation一起用会清空画布