I’ve made a popup div that shows a video if you press a button. If you press Esc, the div is hidden again and the video is removed. (Using JWPlayer in Flash.)
If you click on the JWPlayer video, Flash gets the focus and JavaScript can’t listen for keypresses on the document anymore. Is it possible to make JavaScript get the focus after you’ve interacted with the JWPlayer video player, so that you can still press the Esc button after for example pausing the video?
No there isn’t, once focus is given to flash, the only way to get keypresses back is to click somewhere else.
This happens because flash is under a completely different process, it is responsible for everything within its ‘window‘ and it doesn’t bubble its own events back to JS