From ea8417ff95096f626fae0286135d875a9c043e11 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Mon, 19 Nov 2018 03:01:13 +0100
Subject: [PATCH] Try to fix sound exception...

---
 public/javascripts/components/game.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/javascripts/components/game.js b/public/javascripts/components/game.js
index 7af9c8e3..bd3a1878 100644
--- a/public/javascripts/components/game.js
+++ b/public/javascripts/components/game.js
@@ -538,7 +538,7 @@ Vue.component('my-game', {
 				if (!continuation)
 				{
 					// Not playing sound on game continuation:
-					new Audio("/sounds/newgame.mp3").play().catch(err => {});
+					new Audio("/sounds/newgame.mp3").play().then(() => {}).catch(err => {});
 					document.getElementById("modal-newgame").checked = false;
 				}
 				this.oppid = oppId;
@@ -685,7 +685,7 @@ Vue.component('my-game', {
 			// Not programmatic, or animation is over
 			if (this.mode == "human" && this.vr.turn == this.mycolor)
 				this.conn.send(JSON.stringify({code:"newmove", move:move, oppid:this.oppid}));
-			new Audio("/sounds/chessmove1.mp3").play().catch(err => {});
+			new Audio("/sounds/chessmove1.mp3").play().then(() => {}).catch(err => {});
 			this.vr.play(move, "ingame");
 			if (this.mode == "human")
 				this.updateStorage(); //after our moves and opponent moves
-- 
2.48.1