From 50743fba7228fd731c46e6ba988ab121b7dedfa3 Mon Sep 17 00:00:00 2001 From: Piotr Dabrowski Date: Thu, 22 Aug 2013 13:03:11 +0200 Subject: [PATCH] [Piano] updated Piano sources Change-Id: I5a1f10df9f23add1300624b224992242c53ea868 --- js/main.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/js/main.js b/js/main.js index 706992b..446c77e 100644 --- a/js/main.js +++ b/js/main.js @@ -113,15 +113,11 @@ function Piano() { $(element).addClass('pressed'); this.touchPianoKey[touchId] = element.id; if (audio) { - try { - if (audio.paused) { - audio.play(); - } - if (audio.currentTime !== 0) { - audio.currentTime = 0; - } - } catch (err) { - console.error(err); + if (audio.paused) { + audio.play(); + } + if (audio.currentTime !== 0) { + audio.currentTime = 0; } if (callback instanceof Function) { callback.call(this); -- 2.7.4