温情key
温情key
  • 发布:2022-09-07 17:45
  • 更新:2022-09-07 17:58
  • 阅读:605

uni.getBackgroundAudioManager播放完之后重复调用onEnded事件

分类:uni-app

每次音频放完之后会重复调用自然播放结束事件!!
困了一天了,换了各种方法都是会重复调用

this.bgAudioMannager.onTimeUpdate(() => {  
    this.currentTime = this.bgAudioMannager.currentTime;  
});  
this.bgAudioMannager.onPlay(() => {  
    this.$store.commit('set_icon_play', 'icon-pause');  
});  
this.bgAudioMannager.onPause(() => {  
    this.$store.commit('set_icon_play', 'icon-bofang');  
});  
this.bgAudioMannager.onEnded(() => {  
    console.log('歌曲播放结束');  
    this.getMusic(this.nextId);  
});
2022-09-07 17:45 负责人:无 分享
已邀请:
FullStack

FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866

声明全局变量,如果当前执行过了,就不执行第二次

该问题目前已经被锁定, 无法添加新回复