Skip to content

Make it possible to avoid the keyboard shortcut warning with multiple Paella instances #354

@LukasKalbertodt

Description

@LukasKalbertodt

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):

paella-core - Warning: Warning: more than one paella player instance with enabled shortcut plugins.
paella-core - Warning: Check your code to ensure that only one instance of paella player registers keyboard shortcut plugins.

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 in preLoadPlayer. And that in turn is called unconditionally in loadManifest. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions