Youtube Better Player

Scroll wheel volume, "Are you there" popup bypass, Volume percent display, Infinite autoplay, Volume save

< Feedback on Youtube Better Player

Review: Good - script works

§
Posted: 2022-02-03

Still using this as the code is brass-tacks easy enough a noob like me can make sense of it and it's not another bloater, try-hard mess like you get around this site sometimes. However, maybe a month ago I noticed my videos on YouTube were playing for < 1min and would pause without any input or screen behaviors like turning off the display after no activity, etc. The cursor can be anywhere on the window, too. I was worried maybe my mouse was getting to the point when the Left Click dies or that my SpaceBar was ghost clicking.. a weird hardware thing, etc.

I have it narrowed down to this script and it's either your method for grabbing the whole browser/tab so that the mousewheel can work for volume, and/or it's a bug related to the way Chrome and Windows 11 are very strict about active window focus and "click hijacking/tap-jacking" a browser tab or something like that.

jeanwlAuthor
§
Posted: 2022-02-04

Thank you for the extensive feedback!

The script isn't "triggering clicks", all actions go through the player API (volume set/mute/up/down, play, nextVideo).
Unfortunatelly I can't use W11 so I can't test things out there.

Right now I can't see how this script could pause a video.
Are you still encountering this problem now?

§
Posted: 2022-02-14

I forgot I don't get notifications for replies here, sorry for delayed reply.

That's good to know. I have to look at things outside TamperMonkey scripts because yes it is still happening, even with yours and everything disabled on Youtube. I'm wondering if it's related to Windows 11 security and the crazy window-focus handling stuff they added for fullscreen windows, or some other Chrome thing.

Out of curiosity are there any scripts that do things like send Spacebar input to auto-pause a video in foreground window? I guess it'd be a huge security issue if so, but I don't know.

jeanwlAuthor
§
Posted: 2022-02-14

Yes you can send inputs; that would trigger Spacebar for example:
document.dispatchEvent(new KeyboardEvent('keydown', {keyCode: 32}))`

What you can't do for security purpose is reading keyboard input when window is out of focus.

As for your pause issue, this reddit topic Youtube randomly pauses on pc? could be related?

Post reply

Sign in to post a reply.