Fix: only play sounds on current players device
This commit is contained in:
parent
96828121f3
commit
76cf24fe9a
1 changed files with 3 additions and 2 deletions
|
@ -52,9 +52,10 @@ function Timer() {
|
||||||
(new Date().getTime() - lastPlayerSwitch)) /
|
(new Date().getTime() - lastPlayerSwitch)) /
|
||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
if (this.time == 10) {
|
|
||||||
|
if (this.time == 10 && Alpine.store("remoteState").isMyTurn) {
|
||||||
Alpine.store("audio").playTimeAlmostOver();
|
Alpine.store("audio").playTimeAlmostOver();
|
||||||
} else if (this.time == 0) {
|
} else if (this.time == 0 && Alpine.store("remoteState").isMyTurn) {
|
||||||
Alpine.store("audio").playTimeOver();
|
Alpine.store("audio").playTimeOver();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue