player.js icon indicating copy to clipboard operation
player.js copied to clipboard

Using arrow keys with embedded player wrapper

Open danaburger opened this issue 6 years ago • 1 comments

"I am building a wrapper for the embedded player for use in sports analysis. One of the things I need to do is provided some different keyboard controls than the ones that are built into the player. For example, I need ArrowLeft and ArrowRight events to step a single frame. I can program my wrapper to do this in my browser with the exception of when the player itself has focus. I can't get an overlay

with a high z-index to cover the iframe so that it intercepts events in the capture phase, and stops their downward propagation if I don't what the player itself to hand the event.

Is the element in the player that handles keyboard events positioned statically, so that it doesn't respect z-index? Can you suggest how I can solve this? Is there some way to program the key handles through the player API?"

danaburger avatar Jul 01 '19 02:07 danaburger

I would recommend finding a way to make the player unfocusable while these custom key arrow actions are performed. some info https://stackoverflow.com/questions/716235/how-to-make-a-div-unfocusable

luwes avatar Jul 11 '19 15:07 luwes