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

can you please assign a key to the rotate video option ? #1699

Closed
dante987 opened this issue Jun 9, 2023 · 6 comments · Fixed by #2303
Closed

can you please assign a key to the rotate video option ? #1699

dante987 opened this issue Jun 9, 2023 · 6 comments · Fixed by #2303
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@dante987
Copy link

dante987 commented Jun 9, 2023

can you please assign a key to the rotate video option ?

@dante987 dante987 added Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Jun 9, 2023
@D-Rekk
Copy link
Contributor

D-Rekk commented Jul 4, 2023

Assigning a button to rotate each time by 90?
Screenshot 2023-07-04 alle 22 42 27

In your opinion which would be the correct key to assign?

@dante987
Copy link
Author

dante987 commented Jul 5, 2023

There are vertical videos on YouTube which are uploaded horizontally.
"R" key would do.

@D-Rekk
Copy link
Contributor

D-Rekk commented Jul 5, 2023

There are vertical videos on YouTube which are uploaded horizontally. "R" key would do.

I understand, but I feel like the button is alright for the rotation since it's a pretty niche function. I just came across issue #1566 and there's plans for removing all key binds because of their poor UX (hidden tooltips, think of iPhone's 3D Touch) and undesired behavior.

Maybe we could make an exception for the rotation, but how many users are going to benefit from it? Who's going to use it?
Imagine someone clicking 'R' accidentally, then needs to understand which button performed the rotation by random clicking each key. Finally he would rotate the video with its dedicated icon or just reload the window.

Even the users who mostly see these "rotated" videos, how would they know 'R' is to rotate? The User-Experience is overall bad; there are more downsides than upsides.

@dante987
Copy link
Author

dante987 commented Jul 5, 2023

There could be an option to disable/enable the shortcut keys then and they could be disabled by default. Only those who want to use shortcut keys could use them.
"R" or "Shift+R" if people might press 'R' accidentally.

@ImprovedTube
Copy link
Member

ImprovedTube commented Oct 6, 2023

  • to prepare the option to set any custom shortcut, we mainly only need to add a menu item and call the same function that our rotate button will call on click.
    open source beginner
    web-accessible/shortcuts.js
    • since the function is only defined on-click function, we can copy & paste it to the shortcut.
      line:
      var player = ImprovedTube.elements.player,
      video = ImprovedTube.elements.video,
      rotate = Number(document.body.dataset.itRotate) || 0,
      transform = '';
      rotate += 90;
      if (rotate === 360) {
      rotate = 0;
      }
      document.body.dataset.itRotate = rotate;
      transform += 'rotate(' + rotate + 'deg)';
      if (rotate == 90 || rotate == 270) {
      var is_vertical_video = video.videoHeight > video.videoWidth;
      transform += ' scale(' + (is_vertical_video ? player.clientWidth : player.clientHeight) / (is_vertical_video ? player.clientHeight : player.clientWidth) + ')';
      }

      (or come up with another way to save both, the duplicate lines but also only define the function on click or press of button (not needed otherwise))

@dante987 @D-Rekk

More on shortcuts: #1565

there's plans for removing all key binds because of their poor UX

( automatically will be easy if we do #1565 anyways, else it could be a manual feature as few things are true for all users and we do nothing/little by default)

@ImprovedTube ImprovedTube added the 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) label Oct 7, 2023
@ImprovedTube
Copy link
Member

@ImprovedTube ImprovedTube added the bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) label Nov 5, 2023
This was referenced May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty Will pass on donations (Optional) - (OR: Requester will pay personally. Only if stated!) Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) 🧩Plan ready Solution or some specification noted; To-Do; steps for implementation (+raw brainstorming too maybe) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants