Commit 2cffd84e by 李伟康

修复音频没加载完点击直播后会播放音频BUG

1 parent e5ad7f26
...@@ -414,10 +414,8 @@ export default { ...@@ -414,10 +414,8 @@ export default {
if (data.activityMusic) { if (data.activityMusic) {
this.$nextTick(() => { this.$nextTick(() => {
window.$AUDIO = new Audio(data.activityMusic, () => { window.$AUDIO = new Audio(data.activityMusic, () => {
if (this.isLiveFull) { if (this.isLiveFull) window.$AUDIO.toggleBGM(true)
window.$AUDIO.toggleBGM(true) console.log(this.isLiveFull ?'视频在播,停止音乐':'播放音乐')
console.log('视频在播!!!')
}
this.musicOff = this.isLiveFull this.musicOff = this.isLiveFull
this.audioFlag = true this.audioFlag = true
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!