收藏
回答

createInnerAudioContext动画能取消执行吗?

想在页面隐藏的时候取消动画的执行,这样在进入的时候重新执行动画

回答关注问题邀请回答
收藏

1 个回答

  • Simple
    Simple
    2023-04-08
    请参考
    let innerAudioContext;
    onLoad:function(options){
        innerAudioContext = wx.createInnerAudioContext();
        
        //以下监听事件只需要注册一次就行
        innerAudioContext.onPlay(()=>{//监听播放事件
        })
        innerAudioContext.onStop(()=>{//监听停止事件
        })
        innerAudioContext.onPause(()=>{//监听暂停事件
        })
    },
    
    onUnload:function(e){
        innerAudioContext.destroy();//销毁这个实例
    }
    
    来自链接:https://blog.csdn.net/qq_41226029/article/details/95346514
    
    2023-04-08
    有用 1
    回复
登录 后发表内容