Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A "keypress" event counts as a user gesture, so as long as your code looks like:

document.addEventListener('keypress', event => { if (event.key === 'space') video.play(); });

...then everything should just work fine.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: