Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keybindings for the videoplayer are not successfully overriden #637

Closed
DGoedtkindt opened this issue Oct 10, 2020 · 16 comments · Fixed by #4978
Closed

Keybindings for the videoplayer are not successfully overriden #637

DGoedtkindt opened this issue Oct 10, 2020 · 16 comments · Fixed by #4978
Labels
bug Something isn't working

Comments

@DGoedtkindt
Copy link

DGoedtkindt commented Oct 10, 2020

While browsing the source code I found some code which is supposed to (I believe) override the default keybindings of the video player. However my experience shows that they are not overridden.

The code is located in file src/renderer/components/ft-video-player/ft-video-player.js, from line 464 (keyboardShortcutHandler()).

      if (this.player !== null) {
        switch (event.which) {
          case 32:
            // Space Bar
            // Toggle Play/Pause
            event.preventDefault()
            this.togglePlayPause()
            break
         [...]

If I understand the code correctly, this means that when a video is playing and the user presses the spacebar then the video should toggle between playing and paused. This is not the case:
Steps to reproduce:

  1. open any video
  2. put the video in full screen using the button in the lower right corner of the video
  3. press spacebar
  4. Notice that the video exits fullscreen

The code does not do what it was intended (I believe) to do and I would love the keybinding overriding to be correctly implemented.

v0.9.0 Beta on Manjaro Linux GNOME

@PrestonN PrestonN added the bug Something isn't working label Oct 11, 2020
@PrestonN
Copy link
Member

Will look more into this. In the mean time, if you click on the video while in fullscreen, spacebar to play / pause will once again work.

I am able to reproduce this issue though so I'll look into a proper fix.

@Svallinn
Copy link
Member

@TDDR

This comment was marked as outdated.

@TDDR

This comment has been minimized.

@GilgusMaximus

This comment was marked as outdated.

@pqhf5kd

This comment has been minimized.

@toby63

This comment has been minimized.

@dinotheextinct
Copy link

dinotheextinct commented Jan 24, 2022

This is my biggest issue with Freetube, I'd love to see it fixed

Same for me, hitting space exits Full Window or Fullscreen mode, its frustrating.
Edit:
I just noticed, this behaviour only occurs when using the player buttons on the bottom right. When using "s" or "f" to put the player into full screen/ full window mode, space actually does only pause the video, like it should.

@mastazi
Copy link

mastazi commented Jan 24, 2022

If it isn't planned to be included, could you maybe add a "help appreciated" label to this?
So someone might implement this in a PR?

I would be willing to work on this, I have a couple of ideas that might work well. But I've heard that there is a planned overhaul of the keyboard shortcuts and I'm not sure if solving this issue is already included into that. If it's not, I'm happy to work on it and submit a PR.

@mastazi

This comment was marked as duplicate.

@LudovicRousseau
Copy link

Using the 'f' key to put the video in full screen does help because 'space' can still be used to pause the video. Thanks a lot @dinotheextinct for this solution.

But it would be nice to have the issue fixed and that 'space' always does pause/play instead of switching full screen for newcomers that do not yet have found the 'f' key solution :-)

@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@FreeTubeApp FreeTubeApp deleted a comment from github-actions bot Oct 12, 2023
@efb4f5ff-1298-471a-8973-3d47447115dc

This comment was marked as outdated.

@efb4f5ff-1298-471a-8973-3d47447115dc

Reopening as discussed in #4978 (comment)

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc removed the U: duplicate This issue or pull request already exists label May 13, 2024

This comment has been minimized.

Copy link
Contributor

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Copy link
Contributor

github-actions bot commented Aug 8, 2024

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project