Skip to content

Commit d165bfd

Browse files
authored
Merge pull request #1417 from Studiosity/master
Include keydown event when unlocking audio
2 parents 7c50da1 + d62034b commit d165bfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/howler.core.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@
392392
document.removeEventListener('touchstart', unlock, true);
393393
document.removeEventListener('touchend', unlock, true);
394394
document.removeEventListener('click', unlock, true);
395+
document.removeEventListener('keydown', unlock, true);
395396

396397
// Let all sounds know that audio has been unlocked.
397398
for (var i=0; i<self._howls.length; i++) {
@@ -404,6 +405,7 @@
404405
document.addEventListener('touchstart', unlock, true);
405406
document.addEventListener('touchend', unlock, true);
406407
document.addEventListener('click', unlock, true);
408+
document.addEventListener('keydown', unlock, true);
407409

408410
return self;
409411
},

0 commit comments

Comments
 (0)