h5player
h5player copied to clipboard
[Feature Request] 希望能用快捷键开关跨tab控制
跨tab控制有时会和其他页面上的快捷键冲突,但有时又确实用得上,所以希望能用快捷键控制这个功能的开关。
并且,如果开启了画中画,切换到另一个tab再开一个视频,快捷键会同时控制当前tab的视频和画中画视频,也挺困扰的…
P.S. 感谢辛苦开发和维护这个插件 :)
@twio142 Can you describe the scenario where you use the cross-tab feature? Is that PiP only? Please provide an example URL where you get conflict. And say which browser you use.
There are two shortcuts already that may work for you. Can you try them? Ctrl-\ = toggle .globalMode - When off, shortcuts only affect the focused tab. Ctrl-space = toggle enable - When off, shortcuts are disabled.
Is one of them working for you, or close to what you want? Both of these seems to have unexpected effect. Even when disabled, it seems to send the globalKeydownEvent out.
For your second comment, how would you want it to work? Would the "toggle global mode" (if working properly) be what you wanted? Or would you want the PiP to close automatically whenever another video is started?
Yes, I'm referring to the cross-tab control while PiP is on. I'm using Chrome 94.0.
I also use the Vimium extension and have a bunch of keybindings on other pages, so the cross-tab control can sometimes be disturbing.
This function works no matter global mode is on or off. It's possible to disable all shortcuts though, but you still have to go back to the original page of the PiP video to toggle it. The ctrl-space
shortcut is not a global one.
The concurrent control of both PiP and current tab video occurs on all websites. I'd suggest that the shortcuts only affect one video at a time. But it's a rather rare situation that you got two videos playing at the same time, I'd understand if you consider this case not worth extra development.
By now I just comment out the triggerFakeEvent()
line in the script to fully disable cross-tab control.