While playing a video in full screen mode with the <video>
tag in Chrome and Opera, keypress events are not being triggered.
$(document).on('keypress', function(e) {
if (e.which == 32) {
e.preventDefault()
console.log('space pressed')
}
})
With the above code, pressing space while the video is playing normally, spits out 'space pressed' in the console, but nothing happens when I switch to full screen. The code works in FF, and I haven't yet tested in Safari.
Is there any way to detect the keypress event while in full screen mode?