If the page has focus, space key pauses or resumes the video.
If the video has focus, space key event is triggered for both the page and the video. Thus, space key is pressed twice when the video has focus.
Can't reproduce. What browser are you using?
Brave 1.15.69. It's fine on tor browser which is based on firefox.
I can also reproduce the issue on (ungoogled) Chromium 87.0.4280.88.
I do not know how to fix this. I'm already using preventDefault to try to block the original actions from occurring.
Have you reproduced the issue on chromium-based browsers?
I have.
Today this seems to be fixed(I don't think it was until recently). using chromium 90.0.4430.93 on arch.
That's good news, thanks for the update.