7 ms·
We use keyboard controls in our app (vidhub.co) to control media, looks like a Safari 11 user will no longer be able to just hit a key to start a video if Safar
by azmenak 9y ago
We use keyboard controls in our app (vidhub.co) to control media, looks like a Safari 11 user will no longer be able to just hit a key to start a video if Safari's "automatic inference engine" chooses to block us.
- dragonsky 9y agoI believe you can disable the restriction for particular sites if required.
- jlarocco 9y agoIf it were up to me, they'd remove that ability altogether. Websites that screw with the keyboard are a huge pet peeve of mine.
- jernoble 9y agoA "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.