Laya.SoundManager.autoReleaseSound = true
Laya.SoundManager.autoStopMusic = true
Laya.SoundManager.playSound("sound/bg1.mp3", 0);
Laya.stage.on(Laya.Event.FOCUS, null, function(){
console.log("获取焦点")
Laya.SoundManager.playSound("sound/bg1.mp3", 0);
})
Laya.stage.on(Laya.Event.BLUR, null, function(){
console.log("失去焦点")
})