From a63cbf4b182cc215b93be95dde90fa5bcfdf070f Mon Sep 17 00:00:00 2001 From: Arthur Muchir Date: Thu, 10 Dec 2015 18:26:10 +0100 Subject: [PATCH] Change touchstart to touchend Since iOS 9, Web audio sounds have to be played at touchend, touchstart will not any more start them. --- demo/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/index.js b/demo/index.js index 39e6c55..5489702 100644 --- a/demo/index.js +++ b/demo/index.js @@ -30,13 +30,13 @@ detectAutoplay(function (autoplay) { // On iOS, it has to be a tap event and not a drag + touchend... var onTap = tapEvent(function (ev) { - window.removeEventListener('touchstart', onTap) + window.removeEventListener('touchend', onTap) ev.preventDefault() loading.style.display = 'block' clickToPlay.style.display = 'none' canplay() }) - window.addEventListener('touchstart', onTap) + window.addEventListener('touchend', onTap) } })