Player.js: Disabling or overwriting (some) keyboard controls

Created on 28 Feb 2020  路  2Comments  路  Source: vimeo/player.js

Expected Behavior

I expect an option to disable keyboard controls for video's when the video is not set as background video.

Actual Behavior

I have a custom full screen page, which contains a Vimeo video, when the user started playing and presses F, the video goes to fullscreen. Instead, my own element which contains the video should go to fullscreen.

Steps to Reproduce

I have made codepen to demonstrate what I'm trying to achieve: https://codepen.io/RobertBoes/pen/NWqjmYy

Here you press on F to make the "main div" fullscreen. However, when the user plays the video (and thus has focus on the iframe/video, only the Vimeo iframe goes to fullscreen. I want to prevent this behaviour, or the ability to hook into an event.


Something like this would be perfect:

player.on('fullscreen-change', function () {
  // Do your custom fullscreen, instead of how Vimeo does this
});

This way, when the event is registered, Vimeo should not do anything when "F" is pressed, but instead that's handled by the third party.

Another option would be to just disable keyboard controls

enhancement help wanted

Most helpful comment

The possibility to disable keyboard controls is also required for WCAG compliance: https://www.w3.org/WAI/WCAG21/Understanding/character-key-shortcuts

All 2 comments

The possibility to disable keyboard controls is also required for WCAG compliance: https://www.w3.org/WAI/WCAG21/Understanding/character-key-shortcuts

We are now unable to embed the vimeo player on government websites because of the WCAG compliance as stated by @Archiefkast. It would be nice if we could add an URL parameter to the URL (just like youtube video's allow: disablekb) to disable keyboard controls. youtube's parameters: https://developers.google.com/youtube/player_parameters

Was this page helpful?
0 / 5 - 0 ratings

Related issues

woodhall2k picture woodhall2k  路  4Comments

woluweb picture woluweb  路  4Comments

tmaximini picture tmaximini  路  4Comments

rassemdev picture rassemdev  路  7Comments

jswebrjl picture jswebrjl  路  5Comments