Open LukasKalbertodt opened 9 months ago
I agree that it should be possible to not show the message, but what I would like is to never show the message, and to make the keyboard shortcuts work even if you have more than one player.
At the moment what I've thought of is to capture the events depending on the visibility of the player, taking into account the scroll of the page. If there is more than one player visible in the scroll, the events would be captured by the first player that is visible. It's not a perfect solution, but I think it's better than what we have now.
Any other ideas would be welcome, for the moment I can't think of anything better.
In Tobira, we get this warning for a while now when multiple Paella players are on one page (and also in other situations due to some reasons):
The warning makes sense to me: if multiple players are present, it's not clear what player should be controlled by the keyboard shortcut. However, I don't see a way to avoid this warning as the keyboard shortcuts are always initialized, as far as I can tell:
The warning is emitted in
loadKeyShortcutPlugins
. That function is called unconditionally inpreLoadPlayer
. And that in turn is called unconditionally inloadManifest
. So there is no way to tell Paella to not initialize keyboard shortcuts, right? But that's what is needed to remove this warning and properly handle shortcuts.