-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
functions.js click handler catch html5-video-container #2177
Conversation
Should be optional(? some users might be used to the current way) |
used to how? :-) this is for setting invisible flag for disabling autoplay. Current code is bad as described #2042 (comment) |
in fact its still too much code in the handler, this youtube/js&css/web-accessible/functions.js Line 448 in 04a604b
is redundant, we already check for ad-showing in
|
Currently clicking on the player or play will bypass autoplay-off, while clicking anywhere else wont. |
"current way" is broken autoplayDisable with extension still autoplaying videos despite autoplayDisable being set to On. youtube/js&css/web-accessible/functions.js Lines 454 to 455 in 04a604b
is broken on vertical videos, have to click on the vertical strip with video, meanwhile YT player listens on whole Video element, and finally reading below its broken because things are being initialized too late making it possible for user to click before Extension loaded completely :( All in all those two handlers (keyboard and mouse) are only used to disable autoplayDisable aka let user play video with with "Force Autoplay Off" option enabled. The only thing users should notice changing is autoplayDisable working correctly :) YT sometimes actually tries to autoPlay video 2-3 times in a row when loading/refreshing page :o This is why every time autoplayDisable fails to properly pause video you can see couple console.log("autoplay:off - should we pause here again?"). Our mousedown youtube/js&css/web-accessible/functions.js Line 446 in 04a604b
Now Im scratching my head how youtube/js&css/extension/init.js Lines 58 to 63 in 65bfc33
autoplayDisable from player.js can be working earlier than mousedown from functions.js hmmm, ah here we go: autoplayDisable is initialized in youtube/js&css/web-accessible/init.js Line 96 in 65bfc33
and mousedown lower here youtube/js&css/web-accessible/init.js Line 100 in 65bfc33
wrong order, but even switching order doesnt work for me, listener is unable to catch any clicks while while page is loading youtube/js&css/web-accessible/functions.js Lines 173 to 175 in 04a604b
its timing problems all the way down :/ |
Sounds like you found proof why to undo that! ❤️
Yes! if it helps. (Nor sure single files help [this] open development,
So we can include the whole/same area. ( We could call the current |
found it, should be
Were there any other cases of people having problem with clicking Play and extension overriding it? having to press Play several times to get video to play?
in Build process - same source files as now in the github repo, but automagically combined into one by build script packaging extension for the release
people in that thread describe specifically clicking Play Button and that should have been handled with current code. #1809 (comment): This might be right on the money. It can be a case of ImprovedTube.elements.player not being initialized properly in some situations. Maybe its better to use document.querySelector('.html5-video-container') directly in click handlers as a fallback? something like
|
62a36d2
to
40aedd4
Compare
thanks @raszpl
please. guess we cant have enough fallbacks when selecting the video.
maybe not, just #1809
(yes, i just also enjoy big files. Not sure who else.) |
html5-video-container instead of html5-main-video. Fixes vertical video click handler
#2042