Преглед изворни кода

Fix suspended audio context on mobile (#421)

Jean-Denis Boivin пре 7 година
родитељ
комит
11fcb7aa05
1 измењених фајлова са 2 додато и 0 уклоњено
  1. 2 0
      hxd/snd/NativeChannel.hx

+ 2 - 0
hxd/snd/NativeChannel.hx

@@ -152,6 +152,7 @@ class NativeChannel {
 		div.onclick = stopInput;
 		div.onkeydown = stopInput;
 		js.Browser.document.body.addEventListener("keydown",stopInput);
+		js.Browser.document.body.addEventListener("touchend",stopInput);
 		js.Browser.document.body.appendChild(div);
 		waitDiv = div;
 	}
@@ -161,6 +162,7 @@ class NativeChannel {
 		waitDiv.remove();
 		waitDiv = null;
 		js.Browser.document.body.removeEventListener("keydown",stopInput);
+		js.Browser.document.body.removeEventListener("touchend",stopInput);
 		if( ctx != null ) ctx.resume();
 	}