A Youtube bug disables the space key shortcut, which often happens when you change windows and return to Youtube, often with the ALT + TAB shortcut. This script ensures that the spacebar PAUSE / PLAY shortcut works correctly.
< 腳本Youtube Spacebar Pause/Play Fix的回應
Because I often alt+tab, I like this script very much, but I don’t know why after using this script, after using alt+tab to switch back to the window, Still can't control the playback and pause of the video through the space bar
I hadn't taken into account the fact that Youtube is a single page application, and that the script only runs when you go directly to a video URL, and doesn't run when you go to the Youtube Home page and click on a video.
Now I've updated the script and it should work in both cases, I hope it works on your side too :)
after using alt+tab to switch back to the window, Still can't control the playback and pause of the video through the space bar, Unless I click on the player area with the mouse
Because I often alt+tab, I like this script very much, but I don’t know why after using this script, after using alt+tab to switch back to the window, Still can't control the playback and pause of the video through the space bar