Fix: only play sounds on current players device

This commit is contained in:
Dorian Zedler 2023-12-26 19:46:50 +01:00
parent 96828121f3
commit 76cf24fe9a
Signed by: dorian
GPG Key ID: 989DE36109AFA354
1 changed files with 3 additions and 2 deletions

View File

@ -52,9 +52,10 @@ function Timer() {
(new Date().getTime() - lastPlayerSwitch)) /
1000
);
if (this.time == 10) {
if (this.time == 10 && Alpine.store("remoteState").isMyTurn) {
Alpine.store("audio").playTimeAlmostOver();
} else if (this.time == 0) {
} else if (this.time == 0 && Alpine.store("remoteState").isMyTurn) {
Alpine.store("audio").playTimeOver();
}
}