Commit ccb83048 authored by 汪欢's avatar 汪欢
parents 96fc7acb 0a98220e
......@@ -42,7 +42,7 @@ const playBgMusic = (isOn, src) => {//待测试
bgs[key] = createAudio({
src: src,
autoplay: true,
loop: false /// TODO 暂时无效?2020.08.12 目前有效,但stop后还会跑数据,导致到音频结束到时间又自动播放
loop: true /// TODO 暂时无效?2020.08.12 目前有效,但stop后还会跑数据,导致到音频结束到时间又自动播放
});
......@@ -59,6 +59,8 @@ const playBgMusic = (isOn, src) => {//待测试
bgs[key].onEnded(() => {
if (bgs[key].isOn) { // 判断自己记录的开关
bgs[key].play();
console.log('bgs[key].onEnded')
// bgs[key].isOn = true;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment