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

Hotkey for resolution change only works 50% of the time #2046

Open
ballo opened this issue Feb 24, 2024 · 18 comments
Open

Hotkey for resolution change only works 50% of the time #2046

ballo opened this issue Feb 24, 2024 · 18 comments
Labels
Bug Bug or required update after YouTube changes 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.) Riddle up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@ballo
Copy link

ballo commented Feb 24, 2024

Bug Report:

BUG: Hotkey to change the resolution to "Auto" doesn't trigger half the time and I don't know why
HOW:

  1. Set the default video resolution to 144p
  2. Set the hotkey 'a' to change the resolution to Auto
  3. Load a Youtube video
  4. Press 'a'

Sometimes it works, sometimes it doesn't. I haven't figured out the rhyme or reason why. Pressing 'a' several times doesn't seem to help. If it fails I have to select auto manually via the menu.

@ballo ballo added Bug Bug or required update after YouTube changes 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 Feb 24, 2024
@Anoaxx
Copy link

Anoaxx commented Feb 24, 2024

Sometimes the player is unfocused somehow, and hotkeys dont work

@ballo
Copy link
Author

ballo commented Feb 24, 2024

Sometimes the player is unfocused somehow, and hotkeys dont work

Any workaround?

@Anoaxx
Copy link

Anoaxx commented Feb 24, 2024

try not to focus search bar or header? im not sure. Usually doing other things on page doesnt make that happen, at least for me

@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 25, 2024

hi @ballo did it start only recently?


#1565


unfocused

thanks! @Anoaxx ( i dont know more this time yet but generally writing down exact experiences as soon as you make them,
can be half the work / speed up our development, if they are conclusive/as conclusive as possible. )

search bar

of course single hotkeys and input compete (must, unless using hotkeys that rarely appear in input)

@ballo
Copy link
Author

ballo commented Feb 25, 2024

Compete with what? Nothing uses 'a', and no text input box is ever the focus. All I'm doing is loading a new tab and pressing 'a'

Edit: youtube uses a lot of single letter hotkeys like 1-0, jkl, f, <>, etc.

@ImprovedTube
Copy link
Member

hi @ballo did it start only recently?

@ballo
Copy link
Author

ballo commented Feb 26, 2024

I only recently started using the hotkey so I can't comment on if it ever worked correcty

@ballo
Copy link
Author

ballo commented Feb 29, 2024

It's so weird how when it fails, it can't be made to work. I click different areas and hover the cursor over different things and it just refuses to work.

@ballo
Copy link
Author

ballo commented Mar 1, 2024

I did an experiment replacing the hotkey with ctrl-a instead of just 'a'. I still get situations where the hotkey doesn't work. It's not the choice of the key or key combo that is the issue. The bug appears to be solely related to something grabbing focus and the extension never getting the key event.

@raszpl
Copy link
Contributor

raszpl commented Mar 4, 2024

opening devtools and placing breakpoint on

shows shortcut triggering every time no matter what , at least for me.
Switching to specific resolutions works immediately, switching to Auto takes couple of seconds when we are going from forced 144p, but doesnt work at all if we are trying to go to Auto from forced initial 1080p.
Extension is doing everything right, its YT player deciding to ignore be very slow? for Auto setting if currently playing resolution is close enough:

this.elements.player.getUserPlaybackQualityPreference()
'auto'
this.elements.player.getPlaybackQuality()
'hd1080'

If I pause in the debugger, sit there for a minute, and resume it does actually finally switch to Auto(720).

TLDR: we cant do anything about it, its YT Player doing its own things after being asked to switch to Auto.

@ballo
Copy link
Author

ballo commented Mar 4, 2024

You're switching to auto via elements, which you say isn't working, but when it doesn't work for me I can always do it manually by selecting "Auto" in the quality sub menu. What's the difference between the two?

@raszpl
Copy link
Contributor

raszpl commented Mar 4, 2024

difference between the two

player menu calls youtube private function internally, all we have access to are
player.setPlaybackQualityRange(value);
player.setPlaybackQuality(value);

@ballo
Copy link
Author

ballo commented Mar 4, 2024

OK, well I guess I'll have to keep playing with it. Thanks for the help.

I don't suppose this is a bug that can be reported to Google

@ballo
Copy link
Author

ballo commented Mar 19, 2024

It seems to be working more consistently now. Did Google fix their site?

@ImprovedTube
Copy link
Member

hi @ballo since today?

player menu calls youtube private function internally, all we have access to are
player.setPlaybackQualityRange(value);
player.setPlaybackQuality(value);

(Besides, without these, it wouldn't be the first time that we'd simulate user clicks.)


btw, several youtube-premium users kept asking for us to consider 1080 premium in the feature.

@raszpl
Copy link
Contributor

raszpl commented Jun 29, 2024

could be also a shortcut bug like #2403
#2406 where all shortcuts stop working until reload or alt-tab

@ballo
Copy link
Author

ballo commented Jul 11, 2024

OK it works horribly now. Maybe it stops working when the cursor enters the view? I don't know how to make it work consistently :(

Edit: can't select auto to save my life. Selecting 1080p works maybe 50% of the time

@ballo
Copy link
Author

ballo commented Jul 12, 2024

Huh, trying to select auto instead selects 144p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug or required update after YouTube changes 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.) Riddle up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
None yet
Development

No branches or pull requests

4 participants