Open turkerfatih opened 3 months ago
Workaround is the usingvisibilityjs (https://www.npmjs.com/package/visibilityjs)
import * as Visibility from "visibilityjs";
import { sound } from "@pixi/sound";
Visibility.change((e,s)=>this.onVisibilityChange(e,s));
private onVisibilityChange(e:Event, state:string)
{
if(state=='hidden')
{
sound.muteAll()
}else{
sound.unmuteAll()
}
}
Step to reproduce
Specs: Safari 17.1 MacOS: Sonoma 14.1.1