每次音频放完之后会重复调用自然播放结束事件!!
困了一天了,换了各种方法都是会重复调用
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);
});
1 个回复
FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866
声明全局变量,如果当前执行过了,就不执行第二次