- // added the game and (if focused) is redirected toward it.
- // If no error and the tab is hidden: do not show anything.
- if (!err && !document.hidden) {
- if (this.st.settings.sound)
- new Audio("/sounds/newgame.flac").play().catch(() => {});
- this.$router.push("/game/" + gameInfo.id);
- }
+ // added the game. Maybe a focused one, maybe not.
+ // We know for sure that it emitted the gong start sound.
+ // ==> Do not play it again.
+ if (!err && this.st.settings.sound)
+ new Audio("/sounds/newgame.flac").play().catch(() => {});
+ this.$router.push("/game/" + gameInfo.id);