Explorar o código

Fix suspended audio context on mobile (#421)

Jean-Denis Boivin %!s(int64=7) %!d(string=hai) anos
pai
achega
11fcb7aa05
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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();
 	}